[MacRuby] #721: Compiled ruby files return incorrect values for __FILE__

MacRuby ruby-noreply at macosforge.org
Sat Dec 4 16:02:19 PST 2010


#721: Compiled ruby files return incorrect values for __FILE__
---------------------------------+------------------------------------------
 Reporter:  mred@…               |       Owner:  lsansonetti@…        
     Type:  defect               |      Status:  new                  
 Priority:  major                |   Milestone:                       
Component:  MacRuby              |    Keywords:                       
---------------------------------+------------------------------------------

Comment(by isaackearse@…):

 I can reproduce the original results by changing main.rb to this:

 {{{
 require 'test_file.rb'
 $: << File.dirname(__FILE__)
 require 'test_file'

 }}}

 So it looks like __FILE__ evaluates to an absolute path in an .rb file and
 to a relative path in an .rbo file.

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/721#comment:4>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list