From: Luis Lavena Date: 2008-02-21T01:24:56+09:00 Subject: Re: Is there any object-oriented File class in ruby ? On Feb 20, 1:06 pm, Christopher Dicely wrote: > 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. > That is because Ruby on Windows defines File::ALT_SEPARATOR and on *nix doesn't: irb(main):001:0> File::SEPARATOR => "/" irb(main):002:0> File::ALT_SEPARATOR => "\\" irb(main):003:0> RUBY_PLATFORM => "i386-mswin32" irb(main):001:0> File::SEPARATOR => "/" irb(main):002:0> File::ALT_SEPARATOR => nil irb(main):003:0> RUBY_PLATFORM => "x86_64-linux" HTH, -- Luis Lavena