summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtool/runruby.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/tool/runruby.rb b/tool/runruby.rb
index e6ddbf7..c316ff2 100755
--- a/tool/runruby.rb
+++ b/tool/runruby.rb
@@ -66,7 +66,9 @@ config["bindir"] = abs_archdir
env = {}
-env["RUBY"] = File.join(abs_archdir, "ruby-runner#{config['EXEEXT']}")
+runner = File.join(abs_archdir, "ruby-runner#{config['EXEEXT']}")
+runner = File.expand_path(ruby) unless File.exist?(runner)
+env["RUBY"] = runner
env["PATH"] = [abs_archdir, ENV["PATH"]].compact.join(File::PATH_SEPARATOR)
if e = ENV["RUBYLIB"]