Kernel.load and Kernel.require raise LoadError when called on a file within a
jar and the current working directory is the root directory
-----------------------------------------------------------------------------------------------------------------------------------------
Key: JRUBY-4824
URL: http://jira.codehaus.org/browse/JRUBY-4824
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.5, JRuby 1.4
Environment: Reproduced on:
* Windows XP, Java 1.5, JRuby 1.4
* Windows XP, Java 1.6, JRuby 1.4
* Windows XP, Java 1.5, JRuby 1.5
* Windows XP, Java 1.6, JRuby 1.5
* CentOS, Java 1.5, JRuby 1.4
* CentOS, Java 1.5, JRuby 1.5
Reporter: Benjamin Christenson
Assignee: Thomas E Enebo
Priority: Minor
The following two snippit illustrates the behavior. The fubar.jar file
contains a single file, bar.rb, which has the contents "puts 'BAR'". As a
workaround, it is relatively simple to change the present working directory.
[...@localhost ~]$ java -jar /home/kinetic/jruby-complete-1.5.0.jar -S irb
irb(main):001:0> Dir.pwd
=> "/home/kinetic"
irb(main):002:0> File.exist?('file:/home/kinetic/fubar.jar!/bar.rb')
=> true
irb(main):003:0> load('file:/home/kinetic/fubar.jar!/bar.rb')
BAR
=> true
irb(main):004:0> Dir.chdir '/'
=> 0
irb(main):005:0> Dir.pwd
=> "/"
irb(main):006:0> File.exist?('file:/home/kinetic/fubar.jar!/bar.rb')
=> true
irb(main):007:0> load('file:/home/kinetic/fubar.jar!/bar.rb')
LoadError: No such file to load -- file:/home/kinetic/fubar.jar!/bar.rb
from (irb):7:in `load'
from (irb):7
--
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