aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/marshal/dump_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/marshal/dump_spec.rb')
-rw-r--r--spec/ruby/core/marshal/dump_spec.rb36
1 files changed, 19 insertions, 17 deletions
diff --git a/spec/ruby/core/marshal/dump_spec.rb b/spec/ruby/core/marshal/dump_spec.rb
index 700f090a2f..3a7a083dd8 100644
--- a/spec/ruby/core/marshal/dump_spec.rb
+++ b/spec/ruby/core/marshal/dump_spec.rb
@@ -581,27 +581,29 @@ describe "Marshal.dump" do
-> { Marshal.dump(m) }.should raise_error(TypeError)
end
- it "returns an untainted string if object is untainted" do
- Marshal.dump(Object.new).tainted?.should be_false
- end
+ ruby_version_is ''...'2.7' do
+ it "returns an untainted string if object is untainted" do
+ Marshal.dump(Object.new).tainted?.should be_false
+ end
- it "returns a tainted string if object is tainted" do
- Marshal.dump(Object.new.taint).tainted?.should be_true
- end
+ it "returns a tainted string if object is tainted" do
+ Marshal.dump(Object.new.taint).tainted?.should be_true
+ end
- it "returns a tainted string if nested object is tainted" do
- Marshal.dump([[Object.new.taint]]).tainted?.should be_true
- end
+ it "returns a tainted string if nested object is tainted" do
+ Marshal.dump([[Object.new.taint]]).tainted?.should be_true
+ end
- it "returns a trusted string if object is trusted" do
- Marshal.dump(Object.new).untrusted?.should be_false
- end
+ it "returns a trusted string if object is trusted" do
+ Marshal.dump(Object.new).untrusted?.should be_false
+ end
- it "returns an untrusted string if object is untrusted" do
- Marshal.dump(Object.new.untrust).untrusted?.should be_true
- end
+ it "returns an untrusted string if object is untrusted" do
+ Marshal.dump(Object.new.untrust).untrusted?.should be_true
+ end
- it "returns an untrusted string if nested object is untrusted" do
- Marshal.dump([[Object.new.untrust]]).untrusted?.should be_true
+ it "returns an untrusted string if nested object is untrusted" do
+ Marshal.dump([[Object.new.untrust]]).untrusted?.should be_true
+ end
end
end