File.dirname normalization differs from MRI
-------------------------------------------

                 Key: JRUBY-4863
                 URL: http://jira.codehaus.org/browse/JRUBY-4863
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.5.1
         Environment: JRuby 1.5.1, Ubuntu 10, OpenJDK 1.6
            Reporter: Daniel Berger


MRI strips additional leading slashes with File.dirname:
{noformat}
File.dirname("////foo/bar/baz") => /foo/bar (MRI)
File.dirname("////foo/bar/baz") => ////foo/bar (JRuby)
{noformat}
However, I'm not sure if this "normalization" is intentional in MRI or 
accidental, because it only seems to work on *leading* slashes in MRI:
{noformat}
File.dirname("////foo//bar/baz") => /foo//bar (MRI)
File.dirname("////foo//bar/baz") => ////foo//bar (JRuby)
{noformat}
I'd say the spec needs to be fleshed out. Either the path should be completely 
normalized, or not at all.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
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


Reply via email to