Classloader-sourced "load" will attempt to read a dir as a Ruby file --------------------------------------------------------------------
Key: JRUBY-5314 URL: http://jira.codehaus.org/browse/JRUBY-5314 Project: JRuby Issue Type: Bug Components: Core Classes/Modules Affects Versions: JRuby 1.6 Reporter: Charles Oliver Nutter Fix For: JRuby 1.6 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'. {noformat} ~/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)' {noformat} -- 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