type=class
superclass=Delegator
included=
extended=
dynamically_included=
dynamically_extended=
library=weakref
aliases=
aliasof=

weak reference を実現するクラスです。

[[c:WeakRef]] オブジェクトは与えられたオブジェクトをポイントしますが、
ポイント先のオブジェクトは GC される可能性があります。
アクセスしようとしたときにオブジェクトが GC されていれば
[[c:WeakRef::RefError]] が発生します。

[[lib:delegate]] も参照してください。

=== サンプルコード

  require 'weakref'

  foo = Object.new
  ref = WeakRef.new(foo)
  ref.some_method_of_foo
