summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/delete_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/string/delete_spec.rb')
-rw-r--r--spec/ruby/core/string/delete_spec.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/ruby/core/string/delete_spec.rb b/spec/ruby/core/string/delete_spec.rb
index 6136cd54af..130228041e 100644
--- a/spec/ruby/core/string/delete_spec.rb
+++ b/spec/ruby/core/string/delete_spec.rb
@@ -68,11 +68,13 @@ describe "String#delete" do
-> { "hello".delete("^h-e") }.should raise_error(ArgumentError)
end
- it "taints result when self is tainted" do
- "hello".taint.delete("e").tainted?.should == true
- "hello".taint.delete("a-z").tainted?.should == true
+ ruby_version_is ''...'2.7' do
+ it "taints result when self is tainted" do
+ "hello".taint.delete("e").tainted?.should == true
+ "hello".taint.delete("a-z").tainted?.should == true
- "hello".delete("e".taint).tainted?.should == false
+ "hello".delete("e".taint).tainted?.should == false
+ end
end
it "tries to convert each set arg to a string using to_str" do