From: Calamitas Date: 2008-08-14T23:03:37+09:00 Subject: [ruby-core:18299] Re: Heisencallback? On Thu, Aug 14, 2008 at 3:24 PM, David A. Black wrote: > Hi -- > > It seems a little odd to me that this: > > class C > def self.singleton_method_added(m) > puts "Method #{m} was just defined." > end > end > > produces this output: > > Method singleton_method_added was just defined. > > Wouldn't it be more logical for the callback itself to be excluded > from triggering itself? While we're at it: class Class def method_added(m) puts m end end This came up when looking for a full-proof way of catching all method definitions. There is one however that can never be caught, and that's the one above. To that end, it would help a lot if the *old* callback were called instead of the new one. Peter