Thanks…just learned another thing.
It works fine, however there seems to be a bug or anything like this. At
least in my (v1.6) version of Ruby File::SEPARATOR returns / on both, BSD
and Win32. Is this normal?
I intended to split a user given paht in its components. Thus needing it
(or not?).
Gennady
<gfb@tonesoft.co An: ruby-talk@ruby-lang.org (ruby-talk ML)
> Kopie:
Thema: Re: SEPARATOR doesn't work
08.10.2003 18:04
Bitte antworten
an ruby-talk
Thanks…just learned another thing.
It works fine, however there seems to be a bug or anything like this. At
least in my (v1.6) version of Ruby File::SEPARATOR returns / on both,
BSD
and Win32. Is this normal?
If it is a cygwin built it’s not an error since cygwin uses unix file name
conventions. If it’s not cygwin, it’s likely to be a bug. But I can’t
really remember whether was a bug, because 1.6 is way old… You should
get yourself a new version.
I intended to split a user given paht in its components. Thus needing it
(or not?).
Thanks…just learned another thing.
It works fine, however there seems to be a bug or anything like this. At
least in my (v1.6) version of Ruby File::SEPARATOR returns / on both, BSD
and Win32. Is this normal?
File::ALT_SEPARATOR is non-nil on win32. Actually, you can use / or
as the file separator on win32. Try cd /some/win32/path.
in ruby, File::SEPARATOR is always “/” (at least on win32, cygwin and
linux build) and path are always composed of “/” and not "" (even on
the win32 build, paths seems to be “translated” by ruby on the fly)…
Thanks…just learned another thing.
It works fine, however there seems to be a bug or anything like this. At
least in my (v1.6) version of Ruby File::SEPARATOR returns / on both,
BSD
and Win32. Is this normal?
If it is a cygwin built it’s not an error since cygwin uses unix file name
conventions. If it’s not cygwin, it’s likely to be a bug. But I can’t
really remember whether was a bug, because 1.6 is way old… You should
get yourself a new version.
I intended to split a user given paht in its components. Thus needing it
(or not?).
You should use:
dir, name = File.split( path )
Cheers
robert
–
Pierre Baillet
Emacs, not just a way of life but a complete waste of disk space
Alan Cox