Lars Christensen wrote:
> Hi,
> 
> When I set ENV['PATH'] to nil/empty or some path not including the ruby 
> installation diretory, Kernel#system will still happily launch 
> executables located in the same directory as ruby itself. For example:

It seems that deleting the env var is different from setting it to an 
empty string (probably deleting it causes a fallback to the original value).

puts system("ruby -v")
puts

ENV["PATH"] = ""
p ENV["PATH"]
puts system("ruby -v")
puts

ENV.delete "PATH"
p ENV["PATH"]
puts system("ruby -v")
puts

__END__

ruby 1.8.6 (2008-03-03 patchlevel 114) [i686-linux]
true

""
false

nil
ruby 1.8.6 (2008-03-03 patchlevel 114) [i686-linux]
true
-- 
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407