SEPARATOR doesn't work

  • Thread starter Robert.Koepferl
  • Start date
R

Robert.Koepferl

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
 
G

Gennady

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
=> "/"
 
G

Gavin Sinclair

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


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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,137
Messages
2,570,795
Members
47,342
Latest member
eixataze

Latest Threads

Top