From: Mark Wilson Date: 2003-05-26T08:09:00+09:00 Subject: Re: Getting '\' to be used as the separator in Dir.getwd -- how to? On Sunday, May 25, 2003, at 05:56 PM, Richard wrote: > [snip] > I don't see any cwd method defined in the Shell class, nor in its > required modules: > shell/error > shell/command-processor > shell/process-controller > and it didn't seem I'd find it in any of *their* required modules. (I > only checked the ftool.rb module) > > So how do the separators get transformed? It looks like magic :-) > > Regards, > Richard Hi Richard, I'm a relative newbie too so I learned from your analysis. I simply happen to have been exploring the Shell class because it is a relatively undocumented part of the standard library. A good resource is to run rdoc (available on the RAA) on particular Ruby files and view the result in a browser. I think the Shell object keeps track of the current directory as it changes. See the the chdir method. On the separators, I just don't know. The default record separator is set to '/' unless replaced, but I don't see where it gets the alternate record separator for a non-Unix like system. Perhaps Cygwin supplies this for Ruby on Windows?