From 6fca4ecdd1576d61e12f99f24248f5160a1bff33 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@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 d2b2c7f17e..7ac6918819 100644 --- a/test/rinda/test_rinda.rb +++ b/test/rinda/test_rinda.rb @@ -6,6 +6,8 @@ require 'rinda/tuplespace' require 'singleton' +require 'weakref' + module Rinda class MockClock @@ -499,6 +501,14 @@ class TupleSpaceTest < Test::Unit::TestCase ThreadGroup.new.add(Thread.current) @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 v1.2.3