__FILE__ value incorrect when a script is loaded from the CLASSPATH -------------------------------------------------------------------
Key: JRUBY-4779 URL: http://jira.codehaus.org/browse/JRUBY-4779 Project: JRuby Issue Type: Bug Components: Core Classes/Modules Affects Versions: JRuby 1.5 Environment: Windows Reporter: Gabriel Germain Attachments: test.rb When a script is loaded from the CLASSPATH (through require) the __FILE__ variable isn't the absolute path of the script but classpath:<relative path>. The problem is easily reproductible using a test directory containing one test.rb script printing __FILE__. With JRuby 1.4.1 : > java -cp "jruby-complete-1.4.1.jar;test" org.jruby.main -e "require 'test'" /E:/Work/Test/test/test.rb With JRuby 1.5.0.RC3 > java -cp "jruby-complete-1.5.0.RC3.jar;test" org.jruby.Main -e "require > 'test'" classpath:/./test.rb -- 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