From: Robert Klemme Date: 2004-06-13T00:58:44+09:00 Subject: Re: Any way to get the calling method's binding? "Florian Gross" schrieb im Newsbeitrag news:2j0ktoFrkk6bU1@uni-berlin.de... > Robert Klemme wrote: > > > This seems much simpler to me... > > > > set_trace_func lambda { |event, file, line, id, binding, classname| > > case event > > when "call" > > ( Thread.current[:bindings] ||= [] ).push binding > > when "return" > > Thread.current[:bindings].pop > > end > > } > > Global trace_funcs are a *huge* performance bottle neck. That's why I'm > doing so much work to make sure that the trace_func will go away as soon > as possible. Ah, ok. I thought there should be some advantage... robert