On Tue, Oct 19, 2010 at 10:08 PM, Daniel Berger <djberg96 / gmail.com> wrote:
>
> On Oct 19, 2:02=A0pm, Stefano Mioli <stefano.mi... / gmail.com> wrote:

>> The question is: is there some class in the Ruby library that knows
>> about this difference?
>
> File::PATH_SEPARATOR
>
>> I'm asking this question because I need to figure out if a given
>> executable is in the path and, if it does, retrieve its full path.
>
> require 'ptools'
>
> File.which('ls') # =3D> '/bin/ls'
>
> Works on Windows, too, with or without an extension:
>
> File.which('notepad') =A0 =A0 # Works
> File.which('notepad.exe') # Also works

Many thanks, Dan.
I didn't know about ptools, and somehow I just saw File::SEPARATOR,
but not File::PATH_SEPARATOR.

--=20
Stefano