From: Yukihiro Matsumoto Date: 2005-09-14T00:33:34+09:00 Subject: Re: File.split edge cases Hi, In message "Re: File.split edge cases" on Wed, 14 Sep 2005 00:22:06 +0900, Daniel Berger writes: |> See [ruby-talk:78960]. | | From what I can gather from my research, the current behavior is not |POSIX compliant then. I had difficulty finding documentation regarding |POSIX, paths, split and root directories, but what I did find leads me |to believe that in the case of root directories, the root directory |should be returned as the first element, and the second element should |be empty. Then show me your reasoning. I wish you are correct. The current definition of File.split(path) is [File.dirname(path), File.basename(path)] where POSIX dirname and basename are both defined to return "/" for "/", the only reasonable return value is ["/", "/"], unless we change the definition of File.split. matz.