summaryrefslogtreecommitdiff
path: root/spec/ruby/core/range/inspect_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/range/inspect_spec.rb')
-rw-r--r--spec/ruby/core/range/inspect_spec.rb20
1 files changed, 11 insertions, 9 deletions
diff --git a/spec/ruby/core/range/inspect_spec.rb b/spec/ruby/core/range/inspect_spec.rb
index 3c130812d0..837f7e69ab 100644
--- a/spec/ruby/core/range/inspect_spec.rb
+++ b/spec/ruby/core/range/inspect_spec.rb
@@ -12,15 +12,17 @@ describe "Range#inspect" do
(0.5..2.4).inspect.should == "0.5..2.4"
end
- it "returns a tainted string if either end is tainted" do
- (("a".taint)..."c").inspect.tainted?.should be_true
- ("a"...("c".taint)).inspect.tainted?.should be_true
- ("a"..."c").taint.inspect.tainted?.should be_true
- end
+ ruby_version_is ''...'2.7' do
+ it "returns a tainted string if either end is tainted" do
+ (("a".taint)..."c").inspect.tainted?.should be_true
+ ("a"...("c".taint)).inspect.tainted?.should be_true
+ ("a"..."c").taint.inspect.tainted?.should be_true
+ end
- it "returns a untrusted string if either end is untrusted" do
- (("a".untrust)..."c").inspect.untrusted?.should be_true
- ("a"...("c".untrust)).inspect.untrusted?.should be_true
- ("a"..."c").untrust.inspect.untrusted?.should be_true
+ it "returns a untrusted string if either end is untrusted" do
+ (("a".untrust)..."c").inspect.untrusted?.should be_true
+ ("a"...("c".untrust)).inspect.untrusted?.should be_true
+ ("a"..."c").untrust.inspect.untrusted?.should be_true
+ end
end
end