Re: wrong File::SEPARATOR ?
On Sep 14, 2007, at 5:12 AM, Dan Zwell wrote:
> Ronald Fischer wrote:
>> On my Ruby 1.8.5 under Windows, I have:
>> C:> ruby -e 'puts File::SEPARATOR' /
>> Shouldn't it output '\' instead?
>> Ronald
>
> Nope, this variable correct because within ruby and its core
> libraries, everything can open files with forward slash separated
> paths. Try it.
The truth is that Windows itself understands / as a path separator.
It's just that many interfaces, like the DOS shells, do not.
James Edward Gray II
|