summaryrefslogtreecommitdiff
path: root/spec/ruby/core/hash/shared/to_s.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/hash/shared/to_s.rb')
-rw-r--r--spec/ruby/core/hash/shared/to_s.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/spec/ruby/core/hash/shared/to_s.rb b/spec/ruby/core/hash/shared/to_s.rb
index d180d08c2c..b0e3705d01 100644
--- a/spec/ruby/core/hash/shared/to_s.rb
+++ b/spec/ruby/core/hash/shared/to_s.rb
@@ -77,14 +77,16 @@ describe :hash_to_s, shared: true do
y.send(@method).should == "{1=>{0=>{...}}}"
end
- it "returns a tainted string if self is tainted and not empty" do
- {}.taint.send(@method).tainted?.should be_false
- { nil => nil }.taint.send(@method).tainted?.should be_true
- end
+ ruby_version_is ''...'2.7' do
+ it "returns a tainted string if self is tainted and not empty" do
+ {}.taint.send(@method).tainted?.should be_false
+ { nil => nil }.taint.send(@method).tainted?.should be_true
+ end
- it "returns an untrusted string if self is untrusted and not empty" do
- {}.untrust.send(@method).untrusted?.should be_false
- { nil => nil }.untrust.send(@method).untrusted?.should be_true
+ it "returns an untrusted string if self is untrusted and not empty" do
+ {}.untrust.send(@method).untrusted?.should be_false
+ { nil => nil }.untrust.send(@method).untrusted?.should be_true
+ end
end
it "does not raise if inspected result is not default external encoding" do