1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2022-04-25 14:53:54 +02:00
parent 6ae81d49b5
commit 45cf4f2187
277 changed files with 3844 additions and 7624 deletions

View file

@ -41,18 +41,6 @@ describe "String#insert with index, other" do
"abcd".insert(-3, other).should == "abXYZcd"
end
ruby_version_is ''...'2.7' do
it "taints self if string to insert is tainted" do
str = "abcd"
str.insert(0, "T".taint).should.tainted?
str = "abcd"
other = mock('T')
def other.to_str() "T".taint end
str.insert(0, other).should.tainted?
end
end
it "raises a TypeError if other can't be converted to string" do
-> { "abcd".insert(-6, Object.new)}.should raise_error(TypeError)
-> { "abcd".insert(-6, []) }.should raise_error(TypeError)