summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-31 15:00:04 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-31 15:00:04 +0000
commitc0b4e90f08a188430c17e5668603704906292088 (patch)
tree58e30bf59b341acc68d9d6358f8e5ab702da6bb7 /tool
parent070489975d3a61aeebeedbc5a53d9a99197ca984 (diff)
* tool/mkconfig.rb: generate RbConfig.ruby in rbconfig.rb.
* lib/webrick/httpservlet/cgihandler.rb: use RbConfig.ruby. * test/ruby/envutil.rb: ditto. * benchmark/report.rb: ditto. * benchmark/runc.rb: ditto. * tool/eval.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-xtool/eval.rb4
-rwxr-xr-xtool/mkconfig.rb8
2 files changed, 9 insertions, 3 deletions
diff --git a/tool/eval.rb b/tool/eval.rb
index db6d11cddd..f7299c8b95 100755
--- a/tool/eval.rb
+++ b/tool/eval.rb
@@ -3,9 +3,7 @@ require 'rbconfig'
require 'fileutils'
require 'pp'
-Ruby = ENV['RUBY'] ||
- File.join(RbConfig::CONFIG["bindir"],
- RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"])
+Ruby = ENV['RUBY'] || RbConfig.ruby
#
OPTIONS = %w{
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
index ca1f46713a..df3c35fb80 100755
--- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb
@@ -201,6 +201,14 @@ print <<EOS
CONFIG.each_value do |val|
RbConfig::expand(val)
end
+
+ # returns the absolute pathname of the ruby command.
+ def RbConfig.ruby
+ File.join(
+ RbConfig::CONFIG["bindir"],
+ RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"]
+ )
+ end
end
Config = RbConfig # compatibility for ruby-1.8.4 and older.
CROSS_COMPILING = nil unless defined? CROSS_COMPILING