1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

(test_remote_array_and_hash): pseudo remote objects are protected

against GC. [ruby-dev:27911]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
seki 2005-12-11 13:17:55 +00:00
parent 937731e7f8
commit 5fdf643637
2 changed files with 11 additions and 2 deletions

View file

@ -511,9 +511,13 @@ class TupleSpaceProxyTest < Test::Unit::TestCase
end
def test_remote_array_and_hash
@ts.write(DRbObject.new([1, 2, 3]))
ary = [1, 2, 3]
@ts.write(DRbObject.new(ary))
GC.start
assert_equal([1, 2, 3], @ts.take([1, 2, 3], 0))
@ts.write(DRbObject.new({'head' => 1, 'tail' => 2}))
hash = {'head' => 1, 'tail' => 2}
@ts.write(DRbObject.new(hash))
GC.start
assert_equal({'head' => 1, 'tail' => 2},
@ts.take({'head' => 1, 'tail' => 2}, 0))
end