aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-12-11 13:17:55 +0000
committerseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-12-11 13:17:55 +0000
commit5fdf643637360a7be0bb2b464f85ddeba891bea1 (patch)
tree353410d46cf9c4deb04ae060641ed3ca2be88599
parent937731e7f8f036143e0f9435e115d6eec084b4ce (diff)
downloadruby-5fdf643637360a7be0bb2b464f85ddeba891bea1.tar.gz
(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
-rw-r--r--ChangeLog5
-rw-r--r--test/rinda/test_rinda.rb8
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c0ae9dac5..b050081f5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Dec 11 22:07:58 2005 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
+
+ * test/rinda/test_rinda.rb (test_remote_array_and_hash): pseudo remote
+ objects are protected against GC. [ruby-dev:27911]
+
Sat Dec 10 01:06:06 2005 Keiju Ishitsuka <keiju@ruby-lang.org>
* lib/matrix.rb: add Matrix#determinant_e, Matrix#rank_e.
diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb
index d663e0446d..28da3e89df 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