diff options
Diffstat (limited to 'spec/ruby/language/string_spec.rb')
-rw-r--r-- | spec/ruby/language/string_spec.rb | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/spec/ruby/language/string_spec.rb b/spec/ruby/language/string_spec.rb index a7ca00ef03..d0f62ff3c9 100644 --- a/spec/ruby/language/string_spec.rb +++ b/spec/ruby/language/string_spec.rb @@ -51,24 +51,26 @@ describe "Ruby character strings" do "#\$".should == '#$' end - it "taints the result of interpolation when an interpolated value is tainted" do - "#{"".taint}".tainted?.should be_true + ruby_version_is ''...'2.7' do + it "taints the result of interpolation when an interpolated value is tainted" do + "#{"".taint}".tainted?.should be_true - @ip.taint - "#@ip".tainted?.should be_true + @ip.taint + "#@ip".tainted?.should be_true - $ip.taint - "#$ip".tainted?.should be_true - end + $ip.taint + "#$ip".tainted?.should be_true + end - it "untrusts the result of interpolation when an interpolated value is untrusted" do - "#{"".untrust}".untrusted?.should be_true + it "untrusts the result of interpolation when an interpolated value is untrusted" do + "#{"".untrust}".untrusted?.should be_true - @ip.untrust - "#@ip".untrusted?.should be_true + @ip.untrust + "#@ip".untrusted?.should be_true - $ip.untrust - "#$ip".untrusted?.should be_true + $ip.untrust + "#$ip".untrusted?.should be_true + end end it "allows using non-alnum characters as string delimiters" do |