Bug #1005: Strange behaviour of File.directory? under Windows
http://redmine.ruby-lang.org/issues/show/1005

Author: Alex Fortuna
Status: Open, Priority: Normal

Under Windows:
C:\>ruby --version
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-mswin32]
C:\>irb
irb(main):001:0> File.directory? ".."
=> true
irb(main):002:0> File.directory? "..."
=> true
irb(main):003:0> File.directory? ".............."
=> true

Under Unix:
# ruby --version
ruby 1.8.5 (2006-08-25) [i386-linux]
# irb
irb(main):001:0> File.directory? ".."
=> true
irb(main):002:0> File.directory? "..."
=> false
irb(main):003:0> File.directory? "........"
=> false


I.e. it looks like File.directory? returns true under Windows if filename contains any number of dots.

Sorry, could'n test this exact Ruby version under Unix.


----------------------------------------
http://redmine.ruby-lang.org