File::Separator on win32

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.

···

-----Original Message-----
From: Michael Siebert [mailto:info@siebert-wd.de]
Sent: Monday, July 24, 2006 10:26 AM
To: ruby-talk ML
Subject: File::Separator on win32

Hello Folks,

on my win32 machine, File::Separator returns / instead of a
\. 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?

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 <Daniel.Berger@qwest.com>:

> -----Original Message-----
> From: Michael Siebert [mailto:info@siebert-wd.de]
> Sent: Monday, July 24, 2006 10:26 AM
> To: ruby-talk ML
> Subject: File::Separator on win32
>
> Hello Folks,
>
> on my win32 machine, File::Separator returns / instead of a
> \. 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.

--
Michael Siebert <info@siebert-wd.de>

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

Michael Siebert 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

···

2006/7/24, Berger, Daniel <Daniel.Berger@qwest.com>:

> -----Original Message-----
> From: Michael Siebert [mailto:info@siebert-wd.de]
> Sent: Monday, July 24, 2006 10:26 AM
> To: ruby-talk ML
> Subject: File::Separator on win32
>
> Hello Folks,
>
> on my win32 machine, File::Separator returns / instead of a
> \. 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.

Daniel Berger wrote:

Michael Siebert 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?

···

--
Posted via http://www.ruby-forum.com/\.