diff options
| author | seki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-11 13:17:55 +0000 |
|---|---|---|
| committer | seki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-11 13:17:55 +0000 |
| commit | 378ccacb4d632c8b2749460392ae5322b7ee15bc (patch) | |
| tree | 353410d46cf9c4deb04ae060641ed3ca2be88599 /test/rinda | |
| parent | 86ac83d485040b8d115817fa3b7562d27727ed00 (diff) | |
| download | ruby-378ccacb4d632c8b2749460392ae5322b7ee15bc.tar.gz ruby-378ccacb4d632c8b2749460392ae5322b7ee15bc.tar.xz ruby-378ccacb4d632c8b2749460392ae5322b7ee15bc.zip | |
(test_remote_array_and_hash): pseudo remote objects are protected
against GC. [ruby-dev:27911]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rinda')
| -rw-r--r-- | test/rinda/test_rinda.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb index d663e0446..28da3e89d 100644 --- a/test/rinda/test_rinda.rb +++ b/test/rinda/test_rinda.rb @@ -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 |
