From: Austin Ziegler Date: 2005-12-31T02:55:23+09:00 Subject: Re: Path Separator and Windows On 30/12/05, Justin Johnson wrote: > Regardless of the history I am still of the opinion that something > should change. From this thread it seems that Ruby may have chosen to > use / everywhere to keep things consistent. Can anyone confirm that > this really is the decision? If so, it presents the following problems > for Windows users. > > 1) When a program displays paths back to users they all use / instead > of \ which isn't consistent with how the OS presents the paths to > the user. I don't personally see this as an issue. I might think that having a method #localize for Pathname might be good that does the conversion for you. > 2) Trying to run a program in backticks for example with the paths > using / fails. Then backticks, %x{}, and Kernel#system should probably look for / in the command portion and change it to backslash. > I think a reasonable solution would be to allow the programmer to > configure how Ruby will behave, for example by allowing them to change > a global variable for the path separator. I figured this would be > doable but haven't found a way to do so yet. I also still think it > makes more sense to default to the line separater the OS uses, which > is \ for Windows regardless of what the API allows. I disagree completely. Ruby's paths should always use '/' and the pieces of Ruby which interact with the command-processor and/or the filesystem should do the separator translation. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca