No, the documentation is incorrect: it states that the only path separator accepted by File.basename is "/" regardless of OS. But the method clearly accepts "\" (properly escaped) on Windows systems. On Feb 20, 2008 4:45 AM, Jan Friedrich <janfri.rubyforge / gmail.com> wrote: > 7stud -- wrote: > > > Christopher Dicely wrote: > >> The documentation is incorrect. > >> > >> irb(main):049:0> VERSION > >> => "1.8.6" > >> irb(main):050:0> File.basename("C:\\home\\gumby\\work\\ruby.rb") => > >> "ruby.rb" > >> > >> > > > > irb(main):001:0> VERSION > > => "1.8.6" > > irb(main):002:0> File.basename("C:\\home\\gumby\\work\\ruby.rb") => > > "C:\\home\\gumby\\work\\ruby.rb" > > irb(main):003:0> > > No it is correct: On a Non-Windows system you can have a file with the > name "C:\\home\\gumby\\work\\ruby.rb" in the actual directory. :P > > Regards > Jan > >