From: Daniel Berger Date: 2007-04-03T04:00:07+09:00 Subject: Re: Why does File.join use "/" on Windows? On Mar 30, 3:07 pm, Robert Klemme wrote: > On 30.03.2007 03:21, Bret Pettichord wrote: > > > I just had to work on some code that ran into trouble, because Ruby > > uses "/" to separate folders, but the path was being passed to a > > separate command (using system) that expected Window's paths to use > > "\". > > > C:\Users\bret>irb > > irb(main):001:0> File.join "foo", "bar" > > => "foo/bar" > > irb(main):002:0> > > > I told my collegues that instead of using File.join, they should just > > use + "\\" + > > I'd probably rather use ["foo", "bar"].join File::SEPARATOR (if that's > set to \\ on Windows). Wuby always uses backslashes. :) Regards, Dan