From: "Stathy G. Touloumis" Date: 2002-04-27T00:13:32+09:00 Subject: RE: File.join removing redundant /'s File::Spec->canonpath( '/foo//bar//baz' ); /foo/bar/baz Is there an equivalent in ruby? > ruby 1.6.6 > > irb(main):004:0> File.join("/foo/","bar/","baz") > "/foo//bar//baz" > > i would expect this to be: > > "/foo/bar/baz" > > makes no difference to the OS (AFAIK), just easier on the eyes when > printed. > > (The Perl hacker sitting next to me says that Perl's File::Spec->catfile > acts like this.)