mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
avoid dead lock on MacOS X.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cd6414267f
commit
4a7311e129
1 changed files with 4 additions and 2 deletions
|
@ -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) }
|
||||
|
|
Loading…
Reference in a new issue