diff options
Diffstat (limited to 'spec/ruby/core/symbol/shared/slice.rb')
-rw-r--r-- | spec/ruby/core/symbol/shared/slice.rb | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/spec/ruby/core/symbol/shared/slice.rb b/spec/ruby/core/symbol/shared/slice.rb index 478e0d80ae..3f07f6aedb 100644 --- a/spec/ruby/core/symbol/shared/slice.rb +++ b/spec/ruby/core/symbol/shared/slice.rb @@ -191,12 +191,14 @@ describe :symbol_slice, shared: true do $~.should be_nil end - it "returns a tainted string if the regexp is tainted" do - :symbol.send(@method, /./.taint).tainted?.should be_true - end + ruby_version_is ''...'2.7' do + it "returns a tainted string if the regexp is tainted" do + :symbol.send(@method, /./.taint).tainted?.should be_true + end - it "returns an untrusted string if the regexp is untrusted" do - :symbol.send(@method, /./.untrust).untrusted?.should be_true + it "returns an untrusted string if the regexp is untrusted" do + :symbol.send(@method, /./.untrust).untrusted?.should be_true + end end end @@ -219,12 +221,14 @@ describe :symbol_slice, shared: true do :symbol.send(@method, /(sy)(mb)(ol)/, 1.5).should == "sy" end - it "returns a tainted string if the regexp is tainted" do - :symbol.send(@method, /(.)/.taint, 1).tainted?.should be_true - end + ruby_version_is ''...'2.7' do + it "returns a tainted string if the regexp is tainted" do + :symbol.send(@method, /(.)/.taint, 1).tainted?.should be_true + end - it "returns an untrusted string if the regexp is untrusted" do - :symbol.send(@method, /(.)/.untrust, 1).untrusted?.should be_true + it "returns an untrusted string if the regexp is untrusted" do + :symbol.send(@method, /(.)/.untrust, 1).untrusted?.should be_true + end end describe "and an index that cannot be converted to an Integer" do |