From 35247a52ef719584a59ae9c518523f0ee825c8e3 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 24 Mar 1999 08:52:35 +0000 Subject: 990324 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/weakref.rb | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'lib/weakref.rb') diff --git a/lib/weakref.rb b/lib/weakref.rb index d53aa15c71..d969553090 100644 --- a/lib/weakref.rb +++ b/lib/weakref.rb @@ -2,11 +2,12 @@ # # Usage: # foo = Object.new -# foo.hash +# foo = Object.new +# p foo.to_s # original's class # foo = WeakRef.new(foo) -# foo.hash +# p foo.to_s # should be same class # ObjectSpace.garbage_collect -# foo.hash # => Raises WeakRef::RefError (because original GC'ed) +# p foo.to_s # should raise exception (recycled) require "delegate" @@ -18,9 +19,11 @@ class WeakRef