(11/10/25 3:38), Intransition wrote:
> 
> 
> On Oct 24, 1:15 pm, SASADA Koichi <k... / atdot.net> wrote:
>> (2011/10/23 8:41), Intransition wrote:
>>> Did something change about `set_trace_func` between 1.8.7 and 1.9.3?
>>
>>> One of my programs quite working. Here is the basic spec:
>>
>>>  https://github.com/rubyworks/tracepoint/blob/master/spec/trace.rdoc
>>
>>> This works fine in 1.8.7 but not in 1.9.3.
>>
>>> I'm wondering if I should file a bug report.
>>
>> From 1.9, we skip method invocation on Fixnum#+.
> 
> It appears to be more than that. I traced the issue to the binding
> (`b` below).
> 
>   $ cat t.rb
>   fn = lambda do |e, f, l, m, b, k|
>     p Kernel.eval('self', b)
>   end
>   set_trace_func(fn)
>   "  a  ".strip
> 
>   $ rbenv shell 1.8.7-p352
>   $ ruby t.rb
>   main
>   "  a  "
>   "  a  "
> 
>   $ rbenv shell 1.9.3-rc1
>   $ ruby t.rb
>   main
>   main
>   main
>   main

It seems a bug (binding doesn't work correctly).  Maybe, we don't check
binding for c-methods (methods implemented by C).