diff options
| author | seki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-28 15:41:14 +0000 |
|---|---|---|
| committer | seki <seki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-28 15:41:14 +0000 |
| commit | f65e2e670df38bde4a4ed43684b48e73397688b7 (patch) | |
| tree | e8667e3edcb79688b8222420b7a83259e86ea28c /test | |
| parent | b6011f3d80fb622789fc249e63975f38c822ff98 (diff) | |
| download | ruby-f65e2e670df38bde4a4ed43684b48e73397688b7.tar.gz ruby-f65e2e670df38bde4a4ed43684b48e73397688b7.tar.xz ruby-f65e2e670df38bde4a4ed43684b48e73397688b7.zip | |
improved keeper thread
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
| -rw-r--r-- | test/rinda/test_rinda.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb index d2b2c7f17..7ac691881 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 |
