.class files are loaded before .rb files ignoring the load path ordering
------------------------------------------------------------------------
Key: JRUBY-3029
URL: http://jira.codehaus.org/browse/JRUBY-3029
Project: JRuby
Issue Type: Bug
Components: Java Integration
Reporter: David Koontz
Fix For: JRuby 1.1.5
Attachments: load_path_bug.zip
If you have 2 files with the same name both in directories on your load path
and one is a .rb file and the other is a .class file, the .class file will be
loaded first.
In the example attached I have a file load_test.rb that adds the two
sub-directories to the load path
$LOAD_PATH << File.expand_path(File.dirname(__FILE__) + "/dir1")
$LOAD_PATH << File.expand_path(File.dirname(__FILE__) + "/dir2")
dir1 contains a file, target.rb with the code: puts "target.rb in dir1"
dir2 contains a file, target.class which is the output of running a file
target.rb through jrubyc. The original target.rb file in dir2 was: puts
"target.rb in dir2"
The third line of the load_tes.rb file is then
require 'target'
And the output is: target.rb in dir2
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email