Issue #5104 has been reported by Tomoyuki Chikanaga.

----------------------------------------
Bug #5104: test_rinda.rb ??? GC?護?????
http://redmine.ruby-lang.org/issues/5104

Author: Tomoyuki Chikanaga
Status: Open
Priority: Normal
Assignee: Masatoshi Seki
Category: test
Target version: 1.9.x
ruby -v: ruby 1.9.4dev (2011-07-26 trunk 32672) [i686-linux]


make test-all TESTS="--gc-stress -vq rinda/test_rinda.rb -n test_remote_array_and_hash"
??? GC.stress = true ??? rinda ?????????????????????????????以??????????失?????????????

Rinda::TupleSpaceProxyTest#test_remote_array_and_hash = 4.62 s = E


Finished tests in 4.626161s, 0.2162 tests/s, 0.0000 assertions/s.

  1) Error:
test_remote_array_and_hash(Rinda::TupleSpaceProxyTest):
NoMethodError: undefined method `size' for nil:NilClass
    /home/chikanaga/opt/ruby-trunk/src/ruby/test/rinda/test_rinda.rb:542:in `test_remote_array_and_hash'
    ../ruby/test/runner.rb:15:in `<main>'

1 tests, 0 assertions, 0 failures, 1 errors, 0 skips

???????????????????????????????????DRbObject ??渡?????????????????????????????????????? object_id ??????????????
?????????????????????????? GC ?????????????????????????????????????????????????????????????????????
以??????????????????????????????護???????? OK ???????????????

diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb
index b69b63a..f113777 100644
--- a/test/rinda/test_rinda.rb
+++ b/test/rinda/test_rinda.rb
@@ -539,9 +539,11 @@ 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))
     assert_equal([1, 2, 3], @ts.take([1, 2, 3], 0))
-    @ts.write(DRbObject.new({'head' => 1, 'tail' => 2}))
+    hsh = {'head' => 1, 'tail' => 2}
+    @ts.write(DRbObject.new(hsh))
     assert_equal({'head' => 1, 'tail' => 2},
                  @ts.take({'head' => 1, 'tail' => 2}, 0))
   end



-- 
http://redmine.ruby-lang.org