summaryrefslogtreecommitdiff
path: root/spec/ruby/core/marshal
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-01-28 20:47:48 +0100
committerBenoit Daloze <eregontp@gmail.com>2020-01-28 20:47:48 +0100
commit809f0b8a1357f14f9645210d4812f4400c8d397e (patch)
tree7ce6192f94b1dc4b004798aa5d0c4d6bac02577f /spec/ruby/core/marshal
parented377cc9aaf1ccbede19ddc6c464f5fbf3cabc34 (diff)
Update to ruby/spec@f8a2d54
Diffstat (limited to 'spec/ruby/core/marshal')
-rw-r--r--spec/ruby/core/marshal/dump_spec.rb3
-rw-r--r--spec/ruby/core/marshal/shared/load.rb6
2 files changed, 3 insertions, 6 deletions
diff --git a/spec/ruby/core/marshal/dump_spec.rb b/spec/ruby/core/marshal/dump_spec.rb
index ea021991a8..4ffc586364 100644
--- a/spec/ruby/core/marshal/dump_spec.rb
+++ b/spec/ruby/core/marshal/dump_spec.rb
@@ -556,13 +556,10 @@ describe "Marshal.dump" do
end
describe "when passed a StringIO" do
-
it "should raise an error" do
require "stringio"
-
-> { Marshal.dump(StringIO.new) }.should raise_error(TypeError)
end
-
end
it "raises a TypeError if marshalling a Method instance" do
diff --git a/spec/ruby/core/marshal/shared/load.rb b/spec/ruby/core/marshal/shared/load.rb
index 78fc9fb286..85e645507f 100644
--- a/spec/ruby/core/marshal/shared/load.rb
+++ b/spec/ruby/core/marshal/shared/load.rb
@@ -1,6 +1,5 @@
# -*- encoding: binary -*-
require_relative '../fixtures/marshal_data'
-require 'stringio'
describe :marshal_load, shared: true do
before :all do
@@ -410,8 +409,9 @@ describe :marshal_load, shared: true do
end
it "loads a string through StringIO stream" do
- obj = "This is a string which should be unmarshalled through StringIO stream!"
- Marshal.send(@method, StringIO.new(Marshal.dump(obj))).should == obj
+ require 'stringio'
+ obj = "This is a string which should be unmarshalled through StringIO stream!"
+ Marshal.send(@method, StringIO.new(Marshal.dump(obj))).should == obj
end
it "loads a string with an ivar" do