diff options
author | Benoit Daloze <[email protected]> | 2022-04-25 14:53:54 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2022-04-25 14:53:54 +0200 |
commit | 45cf4f218728a15eb36d14a6c9912086525f5e3f (patch) | |
tree | 2aa93fadcb904c226f722dde47827098b87a9846 /spec/ruby/library/stringio | |
parent | 6ae81d49b52563a6720d666a6118ffa6e484f398 (diff) |
Update to ruby/spec@3affe1e
Diffstat (limited to 'spec/ruby/library/stringio')
-rw-r--r-- | spec/ruby/library/stringio/append_spec.rb | 7 | ||||
-rw-r--r-- | spec/ruby/library/stringio/reopen_spec.rb | 17 | ||||
-rw-r--r-- | spec/ruby/library/stringio/shared/write.rb | 7 |
3 files changed, 0 insertions, 31 deletions
diff --git a/spec/ruby/library/stringio/append_spec.rb b/spec/ruby/library/stringio/append_spec.rb index d0cf5550cd..981229fc10 100644 --- a/spec/ruby/library/stringio/append_spec.rb +++ b/spec/ruby/library/stringio/append_spec.rb @@ -29,13 +29,6 @@ describe "StringIO#<< when passed [Object]" do @io.string.should == "example\000\000\000\000\000\000\000\000just testing" end - ruby_version_is ""..."2.7" do - it "taints self's String when the passed argument is tainted" do - (@io << "test".taint) - @io.string.tainted?.should be_true - end - end - ruby_version_is ""..."3.0" do it "does not taint self when the passed argument is tainted" do (@io << "test".taint) diff --git a/spec/ruby/library/stringio/reopen_spec.rb b/spec/ruby/library/stringio/reopen_spec.rb index 6752cf9970..4863a5332b 100644 --- a/spec/ruby/library/stringio/reopen_spec.rb +++ b/spec/ruby/library/stringio/reopen_spec.rb @@ -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 diff --git a/spec/ruby/library/stringio/shared/write.rb b/spec/ruby/library/stringio/shared/write.rb index 080729217b..0eb71466e3 100644 --- a/spec/ruby/library/stringio/shared/write.rb +++ b/spec/ruby/library/stringio/shared/write.rb @@ -45,13 +45,6 @@ describe :stringio_write_string, shared: true do @io.pos.should eql(4) end - ruby_version_is ""..."2.7" do - it "taints self's String when the passed argument is tainted" do - @io.send(@method, "test".taint) - @io.string.tainted?.should be_true - end - end - ruby_version_is ""..."3.0" do it "does not taint self when the passed argument is tainted" do @io.send(@method, "test".taint) |