# Weak Reference class that does not bother GCing. # # Usage: # foo = Object.new # foo.hash # foo = WeakRef.new(foo) # foo.hash # ObjectSpace.garbage_collect # foo.hash # => Raises WeakRef::RefError (because original GC'ed) require "delegate" class WeakRef