From: "trans. (T. Onoma)" Date: 2004-09-28T21:25:15+09:00 Subject: Re: Best name for "this method" ? On Tuesday 28 September 2004 04:29 am, Florian Gross wrote: > trans. (T. Onoma) wrote: > >>Binding.of_caller? Could you explain this more? I'm not sure to what you > >>are referring. > > > > Okay, I see. I did some research to understand. The problem I see with > > this is that it might have too large an overhead --in effect creating a > > binding prior to every method invocation. Is that so? On the other hand, > > I see no reason for 'self' of caller not to be available. > > Why? As you can see from my trace_func implementation Ruby already knows > how to fetch the binding on demand (via ruby_frame->prev) -- it just > doesn't provide a way to do it from within Ruby. Well, that's my question. Does it just retrieve a reference or does it have to create the binding? If it's just grabbing a reference to an already existing binding, that's fine, but then I don't see why using set_trace_function should slow a program down as much as it does. So I'm guessing it has to create a binding. Although ruby_frame->prev suggests it already exists. I just don't know the internals well enough, and am wondering. T.