File.file?( "uri:classloader:/path/") can be true which is wrong #3342

mkristian opened this Issue Sep 21, 2015 · 0 comments


None yet
3 participants

mkristian commented Sep 21, 2015

java -jar jruby-complete.jar -e 'p File.file?("uri:classloader:/META-INF/jruby.home/")'

which is clearly directory and not a file. and

java -jar jruby-complete.jar -e 'p File.file?("uri:classloader:/META-INF/jruby.home")'

@rtyler rtyler added core embed labels Sep 21, 2015

@mkristian mkristian closed this in 085b5dd Sep 22, 2015

mkristian added a commit that referenced this issue Sep 22, 2015

make sure we contruct the path correctly when testing on isDirectory
this is only an issue with uri:classloader:/ and a classloader setup
where the .jrubydir needs to be loaded to treat the path as directory

fixes #3342

Sponsored by Lookout Inc.

@enebo enebo added this to the JRuby 1.7.23 milestone Oct 13, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment