Re: File::Separator on win32

. this confuses the system so that it cant find the files i
need. is there a way round? is this a bug or wanted behaviour?

Use File::ALT_SEPARATOR instead.

Regards,

Dan

This communication is the property of Qwest and may contain confidential
or
privileged information. Unauthorized use of this communication is
strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and
destroy
all copies of the communication and any attachments.

is ALT_SEPARATOR / on *nixes? according to the docs, its , too. i need
a
portable way without the need to rewrite everything…

2006/7/24, Berger, Daniel [email protected]:

on my win32 machine, File::Separator returns / instead of a
This communication is the property of Qwest and may contain confidential
or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.


Michael S. [email protected]

www.stellar-legends.de - Weltraum-Browsergame im Alpha-Stadium

Michael S. wrote:

is ALT_SEPARATOR / on *nixes? according to the docs, its , too. i need a
portable way without the need to rewrite everything…

Which docs? Anyway, it’s nil on *nix platforms. I’m not sure about
VMS, though.

There’s always RUBY_PLATFORM.match(‘mswin’) :slight_smile:

Regards,

Dan

Daniel B. wrote:

Michael S. wrote:

is ALT_SEPARATOR / on *nixes? according to the docs, its , too. i need a
portable way without the need to rewrite everything…

Which docs? Anyway, it’s nil on *nix platforms. I’m not sure about
VMS, though.

There’s always RUBY_PLATFORM.match(‘mswin’) :slight_smile:

Regards,

Dan

md #{File.join("c:","foo")} fails as well. STDERR contains ‘The
syntax of the command is incorrect’.

In other languages, like Java, the path separator constant/method is
used to abstract the knowledge of which operating system is in play.
Can it not be so in Ruby?