summaryrefslogtreecommitdiff
path: root/test/rinda
diff options
context:
space:
mode:
authorseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-28 15:41:14 +0000
committerseki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-28 15:41:14 +0000
commite2f928a2613d1250e3386043e02caabc5cfbe6e9 (patch)
tree6e7e07ea9db8a49cda82340d8a8467d05a69a1c8 /test/rinda
parent88d5dcc8de20a613d35827198a30010e7ed4279b (diff)
improved keeper thread
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rinda')
-rw-r--r--test/rinda/test_rinda.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb
index 28e455ef85..c0cdffd78a 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