summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/prepend_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/string/prepend_spec.rb')
-rw-r--r--spec/ruby/core/string/prepend_spec.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/ruby/core/string/prepend_spec.rb b/spec/ruby/core/string/prepend_spec.rb
index 485c578e2d..c20c5a9e59 100644
--- a/spec/ruby/core/string/prepend_spec.rb
+++ b/spec/ruby/core/string/prepend_spec.rb
@@ -34,12 +34,14 @@ describe "String#prepend" do
a.should == "hello world"
end
- it "taints self if other is tainted" do
- x = "x"
- x.prepend("".taint).tainted?.should be_true
+ ruby_version_is ''...'2.7' do
+ it "taints self if other is tainted" do
+ x = "x"
+ x.prepend("".taint).tainted?.should be_true
- x = "x"
- x.prepend("y".taint).tainted?.should be_true
+ x = "x"
+ x.prepend("y".taint).tainted?.should be_true
+ end
end
it "takes multiple arguments" do