From: viking@... (Eugene Zaikonnikov) Date: 2002-10-16T22:43:05+09:00 Subject: Hooking on method invocation Hello, Is there a way to hook on invocation of *any* instance method of an object? My first attempt was to override the send method: class Foo #just ban them def send(symbol, *args) puts "blocked" end end It works when I do: foo = Foo.new foo.send :something But it has no effect on "conventional" method invocations. It seems that send is not a part of the built-in method dispatch procedure. I want such functionality to implement 'write barriers' for certain objects. The idea was to track invocation of writer methods and notify object's observer of changes. If this is achievable by other means, any hints will be greatly appreciated. -- Eugene