require "ptools"
File.which("ruby")
···
-----Original Message-----
From: Ara.T.Howard [mailto:Ara.T.Howard@noaa.gov]
Sent: Tuesday, September 13, 2005 7:38 AM
To: ruby-talk ML
Subject: find executables on windowsin linux i'd do something (un-tested) like:
def find_bin bin
bin = nil
path = ENV['PATH'].split File::PATH_SEPARATOR
path.each do |dir|
b = File::join dir, bin
return b if File::executable? b
end
bin
endwhat would the equivalient be in windows? should the above
work or do i need to check some other env vars?cheers.