summaryrefslogtreecommitdiff
path: root/test/rinda/test_rinda.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rinda/test_rinda.rb')
-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