[MacRuby] #936: Kernel#caller reports the wrong line numbers
#936: Kernel#caller reports the wrong line numbers ---------------------------------+------------------------------------------ Reporter: mred@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.8 Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ The Kernel#caller method appears to report the line of the first method called in the caller's body instead of the line where the call actually occurs. {{{ $ cat x.rb class A # line 1 def f caller end def g 1 self.inspect # line 8 2 f # line 10 end end a = A.new puts a.g # line 15 $ ruby x.rb x.rb:10:in `g' x.rb:15 $ macruby x.rb /private/tmp/x.rb:8:in `g' /private/tmp/x.rb:1:in `<main>' }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/936> MacRuby <http://macruby.org/>
#936: Kernel#caller reports the wrong line numbers ---------------------------------+------------------------------------------ Reporter: mred@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------------+------------------------------------------ Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed Comment: Should be fixed in r4589. -- Ticket URL: <http://www.macruby.org/trac/ticket/936#comment:1> MacRuby <http://macruby.org/>
#936: Kernel#caller reports the wrong line numbers ---------------------------------+------------------------------------------ Reporter: mred@… | Owner: lsansonetti@… Type: defect | Status: reopened Priority: minor | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: Keywords: | ---------------------------------+------------------------------------------ Changes (by mred@…): * status: closed => reopened * resolution: fixed => Comment: The Kernel#caller method now reports the line number after the calling line if the calling line is followed by a method invocation. {{{ $ cat x.rb class A def f puts caller end def g f # line 7 self.inspect end end a = A.new a.g ehynes@Pomona:tmp$ macruby x.rb /private/tmp/x.rb:8:in `g' /private/tmp/x.rb:13:in `<main>' }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/936#comment:2> MacRuby <http://macruby.org/>
#936: Kernel#caller reports the wrong line numbers ---------------------------------+------------------------------------------ Reporter: mred@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------------+------------------------------------------ Changes (by lsansonetti@…): * status: reopened => closed * resolution: => fixed Comment: Okay, this should now be fixed as r4787. I started collecting #caller tests as r4786 so that we won't slip a regression in :) -- Ticket URL: <http://www.macruby.org/trac/ticket/936#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby