Ticket #721 (new defect)
Compiled ruby files return incorrect values for __FILE__
| Reported by: | mred@… | Owned by: | lsansonetti@… |
|---|---|---|---|
| Priority: | major | Milestone: | MacRuby Later |
| Component: | MacRuby | Keywords: | |
| Cc: | isaackearse@… |
Description
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.
Change History
Note: See
TracTickets for help on using
tickets.

