apidock.com
05 Apr '12, 5pm
@mitsuhiko Ah, just discovered Kernel#set_trace_func. This may be a path forward.
as the handler for tracing, or disables tracing if the parameter is nil . proc takes up to six parameters: an event name, a filename, a line number, an object id, a binding, and the name of a class. proc is invoked whenever an event occurs. Events are: c-call (call a C-language routine), c-return (return from a C-language routine), call (call a Ruby method), class (start a class or module definition), end (finish a class or module definition), line (execute code on a new line), raise (raise an exception), and return (return from a Ruby method). Tracing is disabled within the context of
Full article:
http://apidock.com/ruby/Kernel/set_trace_func