From: Paul Brannan Date: 2001-11-27T01:42:05+09:00 Subject: [ruby-talk:26527] delegates and weakref It seems that a DelegateClass does not properly delegate to a WeakRef: require 'delegate' require 'weakref' class Foo def method_missing(*args) p args end end f = Foo.new f.foo w = WeakRef.new(f) w.foo class Bar < DelegateClass(WeakRef) def initialize @obj = Foo.new super(WeakRef.new(@obj)) end end b = Bar.new b.foo This produces: [:foo] [:foo] mm.rb:24: undefined method `foo' for # (NameError) Anyone know why this is happening? Any ideas on a workaround (I know I can use a SimpleDelegate, but that has costs)? Paul