One more example of the evil of using cygwin for the base distribution...
Benoit
"Mark Hahn" <mchahn / facelink.com> wrote in message
news:CEENJIKJHPPGICBNAFMIAEKBDAAA.mchahn / facelink.com...
> This is what I get from command line:
>
> C:\>ruby -e'puts Dir.pwd'
> /cygdrive/c
>
> C:\>ruby -e'puts `cmd.exe /c cd`'
> C:\
>
> Shouldn't these agree?  Also I have no directory \cygdrive.
>
> -----Original Message-----
> From: Mark Hahn [mailto:mchahn / facelink.com]
> Sent: Sunday, November 18, 2001 12:18 PM
> To: ruby-talk ML
> Subject: [ruby-talk:25777] Ruby in windows
>
> I was very surprised to find that Dir.pwd in windows returns a path
relative
> to the Ruby directory.  Does it do this in the unix world?  This is
clearly
> wrong.
>
> I need to access mounted Windows volumes.  Is there any easier way for me
to
> list the contents of W:\ than this?
>
> require 'rbconfig'
> include Config
> File.open('run.bat','w') {|f| f.write("w:\r\ndir\r\n")}
> puts (if ENV.has_key?("OS") && ENV["OS"] =~ /nt/i
>    `cmd.exe /c run.bat`
> else
> `command.com /c run.bat`
> end)
>
> If not, then this is a big gap in Ruby's support of Windows.  A common use
> of scripting languages is file manipulation and lacking file support would
> really knock Ruby out of consideration for windows scripting.
>