![]() |
|
|
Issue Type:
|
Bug
|
Affects Versions:
|
JRuby 1.7.0.pre1 |
Assignee:
|
Thomas E Enebo
|
Created:
|
31/Jul/12 12:35 PM
|
Description:
|
Following what I said on #jruby Saturday (28/7):
<eregon> headius: "MRI does something between getAbsolutePath and getCanonicalPath" yeah, I think it does something similar to File.expand_path, which does not resolve symlinks, unlinke File.realpath (and Java File.getCanonicalPath())
<eregon> this is actually a failure I've been observing for a while and intend to report/look into it today
<eregon> this is kind of a lack in Java's File API, absolute path merely expand relative into absolute, and canonical is realpath()
<eregon> seems RubyFile.canonicalize() is what's doing the cleaning work for File.expand_path
So the issue is $LOADED_FEATURES paths are expanded with getCanonicalPath(), which is like realpath(), and thus expand symlinks, while MRI does expand with File.expand_path, which does not expand symlinks.
It can easily be observed on OSX with /tmp being a symlink to /private/tmp.
I prefer JRuby's behavior because it always avoids loading twice the same physical file, while MRI can load it twice given a path with symlinks and one without. But I'm not sure this could be considered a MRI bug either. What do you think?
|
Project:
|
JRuby
|
Priority:
|
Major
|
Reporter:
|
Benoit Daloze
|
|
|
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
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