mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@3affe1e
This commit is contained in:
parent
6ae81d49b5
commit
45cf4f2187
277 changed files with 3844 additions and 7624 deletions
|
@ -206,14 +206,6 @@ describe "StringIO#reopen when passed [Object]" do
|
|||
@io.reopen(obj)
|
||||
@io.string.should == "to_strio"
|
||||
end
|
||||
|
||||
# NOTE: WEIRD!
|
||||
ruby_version_is ""..."2.7" do
|
||||
it "taints self when the passed Object was tainted" do
|
||||
@io.reopen(StringIO.new("reopened").taint)
|
||||
@io.tainted?.should be_true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "StringIO#reopen when passed no arguments" do
|
||||
|
@ -278,15 +270,6 @@ describe "StringIO#reopen" do
|
|||
str.should == ''
|
||||
end
|
||||
|
||||
ruby_version_is ""..."2.7" do
|
||||
it "taints self if the provided StringIO argument is tainted" do
|
||||
new_io = StringIO.new("tainted")
|
||||
new_io.taint
|
||||
@io.reopen(new_io)
|
||||
@io.should.tainted?
|
||||
end
|
||||
end
|
||||
|
||||
it "does not truncate the content even when the StringIO argument is in the truncate mode" do
|
||||
orig_io = StringIO.new("Original StringIO", IO::RDWR|IO::TRUNC)
|
||||
orig_io.write("BLAH") # make sure the content is not empty
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue