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
hakanai opened this issue Dec 16, 2014 · 2 comments
Closed

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

hakanai opened this issue Dec 16, 2014 · 2 comments

Comments

@hakanai
Copy link

hakanai 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
Copy link
Member

headius commented Dec 18, 2014

Lovely...investigating.

@headius
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
Projects
None yet
Development

No branches or pull requests

3 participants