From: Vadim Nasardinov Date: 2004-04-08T02:36:11+09:00 Subject: Re: defadvice in Ruby? On Wednesday 07 April 2004 13:03, Mark Hubbart wrote: > > def method_missing(sym, *args) > > puts "#{sym} called for #{@name}" > > @proxied_object.method(sym).call(*args) > > end ... > also, you should call @proxied_object.send(sym,*args) instead of the > other way, which I think doesn't work. It seems to work either way, but yours seems better. Thanks for pointing this out. Calling @proxied_object.method(sym) would be better, if I wanted to introspect a little deeper into the method and log some extra information about it. > The bigger problem is that the way you did this is really probably a > bad idea. You undefined some critical methods Such as? (I'd like to refine the script, if I can. AspectR seems too heavy-weight for occasional use.) Thanks, Vadim