[MacRuby] #996: Missing Proc#source_location leads to incomplete Kernel#caller backtraces

MacRuby ruby-noreply at macosforge.org
Sun Nov 14 07:20:06 PST 2010


#996: Missing Proc#source_location leads to incomplete Kernel#caller backtraces
-----------------------------------------+----------------------------------
 Reporter:  martijn@…                    |       Owner:  lsansonetti@…        
     Type:  defect                       |      Status:  new                  
 Priority:  major                        |   Milestone:  MacRuby 0.8          
Component:  MacRuby                      |    Keywords:                       
-----------------------------------------+----------------------------------
 I'm trying to use RSpec (latest version, 2.1.0) with MacRuby nightly, but
 there is information missing from the exception backtraces which makes it
 difficult to see where exactly specs fail. The issue is that RSpec uses
 instance_eval with a Proc object to execute an example. In Ruby 1.9.2,
 Procs include their source_location, an Array consisting of the file name
 and line number of the code represented by the Proc. This source_location
 (or actually it's underlying implementation) is used by Ruby 1.9.2 to
 generate Kernel#caller backtraces for code executed from a Proc.

 MacRuby however, doesn't implement Proc#source_location (I checked proc.c
 and compared it to the Ruby 1.9.2 version) and hence Kernel#caller output
 doesn't show backtraces for code executed from a Proc.

 RubySpec contains a failing core/proc/source_location_spec.rb which might
 help in implementing this feature.

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/996>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list