#721: Compiled ruby files return incorrect values for __FILE__
---------------------------------+------------------------------------------
Reporter: m...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: major | Milestone:
Component: MacRuby | Keywords:
---------------------------------+------------------------------------------
Beginning with files "test_file.rb"
{{{
puts "__FILE__ = #{__FILE__}"
}}}
and "main.rb"
{{{
require 'test_file.rb'
require 'test file.rbo'
}}}
arranged like this
{{{
/
tmp
ruby
test_file.rb
ruby2
main.rb
}}}
I then issued the following commands starting in the /tmp directory
{{{
macruby -C ruby/test_file.rb -o ruby2/test_file.rbo
mv ruby/test_file.rb ruby2
cd ruby2
macruby main.rb
}}}
and got the following results
{{{
__FILE__ = /tmp/ruby2/test_file.rb
__FILE__ = ruby/test_file.rb
}}}
The incorrect __FILE__ values make it very difficult design a hierarchy of
files and then load them using 'require' and relative paths for example.
--
Ticket URL: <http://www.macruby.org/trac/ticket/721>
MacRuby <http://macruby.org/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel