From: Mark Wilson Date: 2003-05-26T01:08:04+09:00 Subject: Re: Getting '\' to be used as the separator in Dir.getwd -- how to? On Sunday, May 25, 2003, at 12:51 AM, 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, or do I have to do > pattern substitution? I don't have Windows, so I can't test this, but I think this can be handled by the Shell class. require 'shell' Shell.new.pwd The Shell class (at $/lib/ruby/1.6.8/shell.rb) also has a method to set the default record separator.