From 4c86cd7434646b418412b2ced33824ebe0742e84 Mon Sep 17 00:00:00 2001 From: seki Date: Mon, 28 Feb 2005 15:41:14 +0000 Subject: improved keeper thread git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rinda/test_rinda.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb index 28e455ef8..c0cdffd78 100644 --- a/test/rinda/test_rinda.rb +++ b/test/rinda/test_rinda.rb @@ -4,6 +4,8 @@ require 'drb/drb' require 'drb/eq' require 'rinda/tuplespace' +require 'weakref' + module Rinda module TupleSpaceTestModule @@ -386,6 +388,14 @@ class TupleSpaceTest < Test::Unit::TestCase def setup @ts = Rinda::TupleSpace.new(1) end + + def test_gc + w = WeakRef.new(Rinda::TupleSpace.new) + GC.start + assert_raises(WeakRef::RefError) do + w.__getobj__ + end + end end class TupleSpaceProxyTest < Test::Unit::TestCase -- cgit