From: Joel VanderWerf Date: 2004-01-03T12:03:16+09:00 Subject: Re: Dir.chdir '~' Tim Heaney wrote: > Joel VanderWerf writes: > > >>Does anyone know why this happens? >> >>$ irb >>irb(main):001:0> Dir.chdir '~' >>=> 0 >>irb(main):002:0> Dir.chdir '~' >>Errno::ENOENT: No such file or directory - ~ >> from (irb):2:in `chdir' >> from (irb):2 >>$ ruby -v >>ruby 1.8.1 (2003-12-25) [i686-linux] > > > You must be starting out in a directory with a ~ subdirectory that > does not itself have a ~ subdirectory. Thus the first time you change > to directory ~ it succeeds, but the second time it fails. Yep, that was it. Thanks!