Ruby 1.8.7, Cygwin and File.expand_path()

File.expand_path() in Ruby 1.8.7 doesn’t work like
File.expand_path() in Ruby 1.8.6-p114 on Cygwin on Windows XP
Pro SP 2 (build 2600).

Bug or feature?..

gegroet,
Erik V. - http://www.erikveen.dds.nl/


Ruby 1.8.6-p114

$ ruby -v
ruby 1.8.6 (2008-03-03 patchlevel 114) [i386-cygwin]

$ ruby -e ‘p File.expand_path(“a”)’
“/cygdrive/l/a”

$ ruby -e ‘p File.expand_path(“a”, “b”)’
“/cygdrive/l/b/a”


Ruby 1.8.7

$ ruby -v
ruby 1.8.7 (2008-05-31 patchlevel 0) [i386-cygwin]

$ ruby -e ‘p File.expand_path(“a”)’
“” # <— Wrong

$ ruby -e ‘p File.expand_path(“a”, “b”)’
Uses 100% CPU # <— Very Wrong

Hi,

At Mon, 2 Jun 2008 21:04:36 +0900,
Erik V. wrote in [ruby-talk:303736]:

File.expand_path() in Ruby 1.8.7 doesn’t work like
File.expand_path() in Ruby 1.8.6-p114 on Cygwin on Windows XP
Pro SP 2 (build 2600).

Bug or feature?..

Bug. I think I fixed it in the repository now, thank you.