From: matz@... (Yukihiro Matsumoto) Date: 2001-11-27T12:01:52+09:00 Subject: [ruby-talk:26597] Re: delegates and weakref Hi, In message "[ruby-talk:26536] Re: delegates and weakref" on 01/11/27, Paul Brannan writes: |> It's the limitation. WeakRef is not a "cooked" class, i.e. it doesn't |> complete without specifying target in the "initialize". So, | |I'm not sure I understand what you mean by "cooked." I am calling |WeakRef.new, which should call initialize, right? WeakRef class itself does not provide delegating methods. Its "initialize" method defines them for each WeakRef instance as singleton methods. That's why you don't get the required method information for DelegateClass from WeakRef class. SimpleDelegator takes an instance of WeakRef so that it can get full method information to delegate. You can try using "method_missing" to implement more dynamic delegating classes. matz.