'/' works as a valid path but children don't (under windows) #1653

Closed
walkeriniraq opened this Issue Apr 24, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@walkeriniraq
>> require 'pathname'
>> Pathname.new('/').exist?
=> true
>> Pathname.new('/').children.first.exist?
=> false
>> Pathname.new('C:\\').children.first.exist?
=> true

This is maybe a little obscure but Java considers C:\ to be equivalent to *nix root. And pathname seems to as well, but anything under root isn't recognized. Having this problem in the File class as well, just not as pretty to demo.

Tested under 1.7.12 and 1.7.9 with Java 8 and Win7. Problem exists in all compatibility modes as well.

@enebo enebo closed this in e31f567 Feb 24, 2017

@enebo enebo added this to the JRuby 9.1.8.0 milestone Feb 24, 2017

@enebo

This comment has been minimized.

Show comment
Hide comment
@enebo

enebo Feb 24, 2017

Member

As we are EOL'ing 1.7.x soon we did not fix it there. All are encouraged to upgrade to 9.x.

Member

enebo commented Feb 24, 2017

As we are EOL'ing 1.7.x soon we did not fix it there. All are encouraged to upgrade to 9.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment