From: Logan Capaldo [mailto:logancapaldo / gmail.com]
> On May 10, 2006, at 6:45 PM, Victor Shepelev wrote:
> > class Module
> >   def add_tracer(meth)
> >     m_alias = case meth
> >       when :[] : "old_idx"
> >       when :+ : "old_plus"
> >       when :- : "old_minus"
> >       #and so on
> >       else ; "old_#{meth}"
> >     end
> >     module_eval %Q{
> >       alias :#{m_alias} :#{meth}
> >       def #{meth}(*arg, &block)
> >         puts caller[0] + ": " + self.class.name + "##{meth} called"
> >         #{m_alias}(*arg, &block)
> >       end
> >     }
> >   end
> > end
> -------------------------------------------------- Kernel#set_trace_func
>       set_trace_func(proc)    => proc
>       set_trace_func(nil)     => nil
> ------------------------------------------------------------------------
>       Establishes proc as the handler for tracing, or disables tracing
>       if the parameter is nil. proc takes up to six parameters: an event

Of cause I know about this. My solution is much more lightweight (because
only one function of one class would be slow down).

Victor.