summaryrefslogtreecommitdiff
path: root/lib/weakref.rb
diff options
context:
space:
mode:
author(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-02-24 04:31:29 +0000
committer(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-02-24 04:31:29 +0000
commit831aa6cd961ce56ef248d3a078db4f75c5d2bf6b (patch)
treecb461ab9246a2c8e13d373a8c2d2e6378e4db9cc /lib/weakref.rb
parent62e648e148b3cb9f96dcce808c55c02b7ccb4486 (diff)
This commit was manufactured by cvs2svn to create tag
'v1_3_1_990224'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_3_1_990224@406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/weakref.rb')
-rw-r--r--lib/weakref.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/weakref.rb b/lib/weakref.rb
index c31e959e74..d53aa15c71 100644
--- a/lib/weakref.rb
+++ b/lib/weakref.rb
@@ -60,10 +60,11 @@ class WeakRef<Delegator
end
if __FILE__ == $0
+ require 'thread'
foo = Object.new
- p foo.hash # original's hash value
+ p foo.to_s # original's class
foo = WeakRef.new(foo)
- p foo.hash # should be same hash value
+ p foo.to_s # should be same class
ObjectSpace.garbage_collect
- p foo.hash # should raise exception (recycled)
+ p foo.to_s # should raise exception (recycled)
end