added a comment - - edited
Actually, File.join does not add \, and the RubySpec description is very misleading:
"joins parts using File::ALT_SEPARATOR on windows".
The RDoc documentation is simple: "Returns a new string formed by joining the strings using File::SEPARATOR." (File::SEPARATOR being always "/").
But the hidden behavior is MRI does keep the \ if they are present and do not insert '/'.
This does not seem to be tested in MRI test/
I wonder if this can be considered as a bug (Ruby is always returning paths with "/" when you give no \ ).
And I agree there should be some unification of the separator (which seems already the direction, but could be stricter).
I'll ask on ruby-core.
Is this the fix? http://gist.github.com/307130