Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requiring a bare file from current directory works unexpectedly #3049

eregon opened this Issue Jun 15, 2015 · 3 comments


None yet
4 participants
Copy link

eregon commented Jun 15, 2015


puts "BUG"
$ bin/jruby -e 'require "test"'

This should not find the file (well, unless "." is in $: but it is not) and raise a LoadError.

The last update to RubySpec revealed the bug.
9da2c2c should be revert once it is fixed.


This comment has been minimized.

Copy link

headius commented Jun 15, 2015

This is a side effect of our desire to present both Ruby and Java command-line semantics. When running the "java" command at the command line, the current directory is added to the classpath. We do the same in our launcher. This causes Ruby files to be accessible because they can be found via classloader searching.

I'm not opposed to removing this classpath entry, but it would be a change from how the "jruby" command has run for many years.


This comment has been minimized.

Copy link

mkristian commented Jun 15, 2015

I did removed this java "feature" on my branch where I want to move the last bit of the old "LoadService" into the new one.

I always thought this is the desired feature since we have already such a test which does not fail for other reasons (ruby PWD != java PWD)

but whatever is decided here I would incorporate it in the above branch.

@enebo enebo added this to the JRuby milestone Jul 6, 2015

@enebo enebo added the JRuby 9000 label Jul 6, 2015


This comment has been minimized.

Copy link

mkristian commented Jul 6, 2015

fixed with #3073 which also added a test for this

@mkristian mkristian closed this Jul 6, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.