summaryrefslogtreecommitdiff
path: root/tool/runruby.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-04 01:25:42 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-04 01:25:42 +0000
commit85e83e9f93f5d2acd25f22f761f8525ac75b5ec0 (patch)
tree04b110bcce638e6a5dfcbd8df13a0605c9e6208a /tool/runruby.rb
parentc604000a311e7379b487f581a53f7c950105224a (diff)
runruby.rb: fallback to ruby
* tool/runruby.rb: use ruby-runner only when exists and fallback to ruby itself. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/runruby.rb')
-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"]