[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

SEPARATOR doesn't work

Robert.Koepferl

10/8/2003 3:57:00 PM





Hi,
I'm using ruby-win32 1.6 and I'm trying to get the Path-separator ( eg. /
or \ ) to wirte protable programs

However

File.SEPARATOR
SEPARATOR
$SEPARATOR
Dir.SEPARATOR

all return nil. What's wrong


2 Answers

Gennady

10/8/2003 4:05:00 PM

0

Robert.Koepferl@de.gi-de.com wrote:
>
>
>
> Hi,
> I'm using ruby-win32 1.6 and I'm trying to get the Path-separator ( eg. /
> or \ ) to wirte protable programs
>
> However
>
> File.SEPARATOR
> SEPARATOR
> $SEPARATOR
> Dir.SEPARATOR
>
> all return nil. What's wrong
>
>

irb(main):001:0> File.SEPARATOR
NameError: undefined method `SEPARATOR' for File:Class
from (irb):1
irb(main):002:0> File::SEPARATOR
=> "/"




Gavin Sinclair

10/8/2003 10:46:00 PM

0

On Thursday, October 9, 2003, 1:56:56 AM, Robert wrote:

> Hi,
> I'm using ruby-win32 1.6 and I'm trying to get the Path-separator ( eg. /
> or \ ) to wirte protable programs

> However

> File.SEPARATOR
> SEPARATOR
> $SEPARATOR
> Dir.SEPARATOR

> all return nil. What's wrong

File.join(elt, elt, elt) is a handy way of achieving this
(where elt is a path element).

Gavin