diff options
Diffstat (limited to 'spec/ruby/core/string/shared/chars.rb')
-rw-r--r-- | spec/ruby/core/string/shared/chars.rb | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/spec/ruby/core/string/shared/chars.rb b/spec/ruby/core/string/shared/chars.rb index c8716521bd..9c7a4deb8b 100644 --- a/spec/ruby/core/string/shared/chars.rb +++ b/spec/ruby/core/string/shared/chars.rb @@ -64,15 +64,17 @@ describe :string_chars, shared: true do ] end - it "taints resulting strings when self is tainted" do - str = "hello" + ruby_version_is ''...'2.7' do + it "taints resulting strings when self is tainted" do + str = "hello" - str.send(@method) do |x| - x.tainted?.should == false - end + str.send(@method) do |x| + x.tainted?.should == false + end - str.dup.taint.send(@method) do |x| - x.tainted?.should == true + str.dup.taint.send(@method) do |x| + x.tainted?.should == true + end end end end |