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

File.realpath treats absolute "classpath:/" paths as relative paths #2331

Closed
trejkaz opened this Issue Dec 16, 2014 · 2 comments

Comments

Projects
None yet
3 participants
@trejkaz
Copy link

trejkaz commented Dec 16, 2014

On JRuby 1.7.17, File.realpath does the following when passed an absolute "classpath:/" path:

irb(main):001:0> File.realpath('classpath:/java/lang/String.class')
=> "/current/working/directory/classpath:/java/lang/String.class"

On JRuby 1.7.13 (which I happen to have handy because we haven't updated since that version):

irb(main):001:0> File.realpath('classpath:/java/lang/String.class')
=> "classpath:/java/lang/String.class"

@enebo enebo added this to the JRuby 1.7.18 milestone Dec 16, 2014

@headius

This comment has been minimized.

Copy link
Member

headius commented Dec 18, 2014

Lovely...investigating.

@headius

This comment has been minimized.

Copy link
Member

headius commented Dec 18, 2014

Tracked the regression down to 141af57 by @donv, which added real-file canonicalization around the original result of File.realpath, causing all URLs to get prefixed with cwd. Obviously we didn't have good testing here (and still don't, though I'll add one for this case).

Fix pending.

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.