[MacRuby] #936: Kernel#caller reports the wrong line numbers

MacRuby ruby-noreply at macosforge.org
Wed Oct 6 15:01:35 PDT 2010


#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/>



More information about the macruby-tickets mailing list