From: RLMuller@... (Richard) Date: 2003-05-26T06:56:17+09:00 Subject: Re: Getting '\' to be used as the separator in Dir.getwd -- how to? Hi Mark, > require 'shell' > > Shell.new.pwd That worked great. Many thanks. That's the simplest approach I've seen so far, and I don't see how it could be much simpler I took a look at shell.rb to see how this command worked. I'm a Ruby newbie, so if you have time, please identify what I'm missing in my understanding (and if you don't, no problem; thanks for what you've done!): Shell.new creates a shell object and invokes the initialize method on that object. The first thing that method did is initialize the instance variable @cmd to the result of Dir.pwd, which returns the current working directory with forward-slash delimiters. Then the command invokes the pwd method on that initialized Shell object. That name is an alias for the cwd instance method. But 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