From: transfire@... Date: 2006-07-05T12:08:29+09:00 Subject: Re: About 1.9 #__method__ feature. Florian Gross wrote: > ara.t.howard@noaa.gov wrote: > > > any idea of the limitations of Binding.of_caller? > > It depends on a bug in Ruby (but that can be fixed as soon as that bug > is fixed) and will only work 100% correctly if you are using it in a > method that is called in the same context as its caller. For example > breakpoint() is OK, but Breakpoint.breakpoint() will not give you the > correct instance variables. > > I don't think it is too slow. Not being able to restore previous trace > funcs is another downside, however. > > Perhaps it is time to write a C extension for this after all? I was never quite sure why it wasn't already. After all you can get the binding of the caller if you pass a block,even an empty one. def x( &blk ) Kernel.eval( "self", blk.binding ) end T.