summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-08 03:01:55 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-08 03:01:55 +0000
commit386a3ef3344cb44f06d8d8e3a67c7ead3ee6c00b (patch)
treed7d9c3af6e3e4380649e3a5e4b00c5bf0abdf844
parent0bd0d6ab6be3f4f05fb486483a9bd10760971687 (diff)
downloadruby-386a3ef3344cb44f06d8d8e3a67c7ead3ee6c00b.tar.gz
ruby-386a3ef3344cb44f06d8d8e3a67c7ead3ee6c00b.tar.xz
ruby-386a3ef3344cb44f06d8d8e3a67c7ead3ee6c00b.zip
avoid dead lock on MacOS X.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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 c0e6f996e..267f435bc 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) }