summaryrefslogtreecommitdiff
path: root/spec/ruby/library/stringscanner/shared/extract_range.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/stringscanner/shared/extract_range.rb')
-rw-r--r--spec/ruby/library/stringscanner/shared/extract_range.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/spec/ruby/library/stringscanner/shared/extract_range.rb b/spec/ruby/library/stringscanner/shared/extract_range.rb
index 7e98540b1a..1c14f716c9 100644
--- a/spec/ruby/library/stringscanner/shared/extract_range.rb
+++ b/spec/ruby/library/stringscanner/shared/extract_range.rb
@@ -9,14 +9,16 @@ describe :extract_range, shared: true do
ch.should be_an_instance_of(String)
end
- it "taints the returned String if the input was tainted" do
- str = 'abc'
- str.taint
+ ruby_version_is ''...'2.7' do
+ it "taints the returned String if the input was tainted" do
+ str = 'abc'
+ str.taint
- s = StringScanner.new(str)
+ s = StringScanner.new(str)
- s.send(@method).tainted?.should be_true
- s.send(@method).tainted?.should be_true
- s.send(@method).tainted?.should be_true
+ s.send(@method).tainted?.should be_true
+ s.send(@method).tainted?.should be_true
+ s.send(@method).tainted?.should be_true
+ end
end
end