From: daz Date: 2003-05-25T18:52:56+09:00 Subject: Re: Getting '\' to be used as the separator in Dir.getwd -- how to? "Richard" wrote: > I'm running Ruby 1.6.8 over Win2000SP3. Dir.getwd returns the current > directory with forward slash as the separator. I tried setting > SEPARATOR = "\\" at the beginning of the script, to no avail. Is > there a way to get the correct form returned ... Looking at the code, the file separator is wired as '/'. Ruby takes this format as input but if you need Win format you'll ... > ... have to do pattern substitution. Erm, probably, yes. Dir.getwd.gsub!(File::SEPARATOR, File::ALT_SEPARATOR) # -> E:\Gallery\JoGuest (YMMV;) daz