diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/envutil.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb index cd9ad3c858..cf7f6e9887 100644 --- a/test/ruby/envutil.rb +++ b/test/ruby/envutil.rb @@ -1,11 +1,18 @@ module EnvUtil def rubybin + unless ENV["RUBYOPT"] + + end if ruby = ENV["RUBY"] return ruby end ruby = "ruby" + rubyexe = ruby+".exe" 3.times do - if File.exist? ruby or File.exist? ruby+".exe" + if File.exist? ruby and File.executable? ruby and !File.directory? ruby + return File.expand_path(ruby) + end + if File.exist? rubyexe and File.executable? rubyexe return File.expand_path(ruby) end ruby = File.join("..", ruby) |