summaryrefslogtreecommitdiff
path: root/test/ruby/envutil.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/envutil.rb')
-rw-r--r--test/ruby/envutil.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb
index 38dba96c931..09c8e3f7f4a 100644
--- a/test/ruby/envutil.rb
+++ b/test/ruby/envutil.rb
@@ -1,5 +1,8 @@
module EnvUtil
def rubybin
+ if ruby = ENV["RUBY"]
+ return ruby
+ end
miniruby = "miniruby"
3.times do
if File.exist? miniruby or File.exist? miniruby+".exe"
@@ -9,7 +12,6 @@ module EnvUtil
end
begin
require "rbconfig"
- ENV["RUBY"] or
File.join(
Config::CONFIG["bindir"],
Config::CONFIG["ruby_install_name"] + Config::CONFIG["EXEEXT"]