Hi all, We were wondering if it's possible to catch all method calls. I mean a kind of 'hook' that allow you to do something just before a method is executed. Browsing in the mailing list's archives, we read this thread about this topic: http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/668. Anyway, this thread is pretty old, so we'd like to know if nowadays exists a mechanism to do that. Thank you all in advance!
on 2006-02-10 11:53
on 2006-02-10 13:03
This is a good read, if you want to implement such wrapper. It's not old... :) http://tinyurl.com/93yy9 gegroet, Erik V.
on 2006-02-10 16:03
Check out Kernel#set_trace_func. Note it is very slow! Kent.