From 5aea2fee202e65d3e15583dc25ce4ebf3e97575d Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 4 Oct 2015 01:25:42 +0000 Subject: 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 --- tool/runruby.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tool/runruby.rb') diff --git a/tool/runruby.rb b/tool/runruby.rb index e6ddbf7f39..c316ff2d47 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"] -- cgit v1.2.3