Project

General

Profile

Actions

Bug #5527

closed

set_trace_func binding incorrect

Bug #5527: set_trace_func binding incorrect

Added by trans (Thomas Sawyer) almost 14 years ago. Updated about 6 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.3dev (2011-09-23 revision 33323) [x86_64-linux]
[ruby-core:40568]

Description

set_trace_func seems to be broken. 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 would seem the binding has somehow become the binding-of-caller, rather than receiver.

Updated by ko1 (Koichi Sasada) over 13 years ago Actions #1 [ruby-core:43204]

  • Category set to core
  • Status changed from Open to Assigned
  • Assignee set to ko1 (Koichi Sasada)
  • Target version set to 2.0.0

Maybe it is implicit incompatibility between 1.8 and 1.9. No one can find out about it.
What should we do on 2.0?

Updated by ko1 (Koichi Sasada) almost 13 years ago Actions #2 [ruby-core:50130]

  • Target version changed from 2.0.0 to 2.6

no discussion.

Updated by ko1 (Koichi Sasada) over 8 years ago Actions #3 [ruby-core:79351]

  • Description updated (diff)
  • Status changed from Assigned to Feedback

Should we change it?

Updated by naruse (Yui NARUSE) almost 8 years ago Actions #4

  • Target version deleted (2.6)

Updated by jeremyevans0 (Jeremy Evans) about 6 years ago Actions #5

  • Status changed from Feedback to Closed
Actions

Also available in: PDF Atom