From 4a7311e12977ca2cd388f609c3c705ba219bfee5 Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 8 Jun 2008 03:01:55 +0000 Subject: avoid dead lock on MacOS X. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_marshal.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb index c0e6f996e9..267f435bcb 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) } -- cgit v1.2.3