From: Dave Burt Date: 2005-11-19T15:52:22+09:00 Subject: Re: File::Spec equivalent? >>>What I'm specificalliy looking for is a version of File.join() that will >>>join components with backslashes instead of forward slashes on Windows... > > Isn't this what File.join is supposed to do? I haven't tried Ruby on > Windows, but the documentation for File.join in Pickaxe is: > > "Returns a new string formed by joining the strings using > File::SEPARATOR." > > Presumably File::SEPARATOR is defined as backslash on Windows and > forward-slash on *nix machines. No: C:\WINDOWS>ruby -e "p [File::SEPARATOR, File.join('a','b')]" ["/", "a/b"] File.join(*foo).gsub("/", "\\") might do what the OP wanted. Cheers, Dave