Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: JRuby 1.6RC1
-
Fix Version/s: None
-
Component/s: Core Classes/Modules
-
Labels:None
-
Number of attachments :
Description
This is pretty wacky. We must not be checking if a resource in classloader is a directory when doing a 'load'. Not sure why this wouldn't affect 'require'.
~/projects/jruby ➔ ls -a blah . .. .this_is_not_valid_ruby ~/projects/jruby ➔ CLASSPATH=. jruby -e "load 'blah'" org/jruby/RubyKernel.java:1066:in `load': classpath:/./blah:1: syntax error, unexpected tDOT (SyntaxError) .this_is_not_valid_ruby ^ from -e:1:in `(root)' ~/projects/jruby ➔ jar cvf yuck.jar blah/.this_is_not_valid_ruby added manifest adding: blah/.this_is_not_valid_ruby(in = 0) (out= 0)(stored 0%) ~/projects/jruby ➔ CLASSPATH=yuck.jar jruby -e "load 'blah'" org/jruby/RubyKernel.java:1066:in `load': classpath:/./blah:1: syntax error, unexpected tDOT (SyntaxError) .this_is_not_valid_ruby ^ from -e:1:in `(root)'
FYI, when using "require" it properly produces a LoadError: