summaryrefslogtreecommitdiff
path: root/test/ruby/test_marshal.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_marshal.rb')
-rw-r--r--test/ruby/test_marshal.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index c0e6f996e98..267f435bcb5 100644
--- a/test/ruby/test_marshal.rb
+++ b/test/ruby/test_marshal.rb
@@ -89,13 +89,15 @@ class TestMarshal < Test::Unit::TestCase
o1 = C.new("a" * 10000)
r, w = IO.pipe
+ t = Thread.new { Marshal.load(r) }
Marshal.dump(o1, w)
- o2 = Marshal.load(r)
+ o2 = t.value
assert_equal(o1.str, o2.str)
r, w = IO.pipe
+ t = Thread.new { Marshal.load(r) }
Marshal.dump(o1, w, 2)
- o2 = Marshal.load(r)
+ o2 = t.value
assert_equal(o1.str, o2.str)
assert_raise(TypeError) { Marshal.dump("foo", Object.new) }