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
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue