From 91edcb053b3dd0a86ad7cec0a652d084d6e7dd46 Mon Sep 17 00:00:00 2001 From: drbrain Date: Fri, 4 Aug 2006 22:00:31 +0000 Subject: Merge RDoc changes from HEAD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/weakref.rb | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'lib/weakref.rb') diff --git a/lib/weakref.rb b/lib/weakref.rb index 142286e765..7d43f71264 100644 --- a/lib/weakref.rb +++ b/lib/weakref.rb @@ -1,13 +1,13 @@ - require "delegate" -# Weak Reference class that does not bother GCing. This allows the -# referenced object to be garbage collected as if nothing else is -# referring to it. Because Weakref inherits from Delegator it passes -# method calls to the object from which it was constructed, so it -# is of the same Duck Type. +# WeakRef is a class to represent a reference to an object that is not seen by +# the tracing phase of the garbage collector. This allows the referenced +# object to be garbage collected as if nothing is referring to it. Because +# WeakRef delegates method calls to the referenced object, it may be used in +# place of that object, i.e. it is of the same duck type. # # Usage: +# # foo = Object.new # foo = Object.new # p foo.to_s # original's class @@ -62,9 +62,9 @@ class WeakRef