# Ruby 1.8.7, Cygwin and File.expand\_path()

**URL:** <https://www.ruby-forum.com/t/ruby-1-8-7-cygwin-and-file-expand-path/139266>\
**Category:** Ruby\
**Created:** [June 2, 2008, 2:08pm UTC](https://www.ruby-forum.com/t/ruby-1-8-7-cygwin-and-file-expand-path/139266 "2008-06-02T14:08:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![erikveen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/59ef9b/32.png) [@erikveen](https://www.ruby-forum.com/u/erikveen)\
**Post date:** [June 2, 2008, 2:08pm UTC](https://www.ruby-forum.com/t/ruby-1-8-7-cygwin-and-file-expand-path/139266/1 "2008-06-02T14:08:21Z")

</div>

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/](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

---

<div class="post-metadata">

**Author:** ![erikveen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/59ef9b/32.png) [@erikveen](https://www.ruby-forum.com/u/erikveen)\
**Post date:** [June 3, 2008, 9:29am UTC](https://www.ruby-forum.com/t/ruby-1-8-7-cygwin-and-file-expand-path/139266/2 "2008-06-03T09:29:49Z")

</div>

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.
