Permalink
Browse files

* 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
  • Loading branch information...
1 parent 0704899 commit c0b4e90f08a188430c17e5668603704906292088 @akr akr committed Dec 31, 2009
Showing with 27 additions and 16 deletions.
  1. +14 −0 ChangeLog
  2. +1 −3 benchmark/report.rb
  3. +1 −3 benchmark/runc.rb
  4. +1 −3 lib/webrick/httpservlet/cgihandler.rb
  5. +1 −4 test/ruby/envutil.rb
  6. +1 −3 tool/eval.rb
  7. +8 −0 tool/mkconfig.rb
View
@@ -1,3 +1,17 @@
+Thu Jan 1 00:00:00 2010 Tanaka Akira <akr@fsij.org>
+
+ * 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.
+
Thu Dec 31 18:18:55 2009 NAKAMURA Usaku <usa@ruby-lang.org>
* ext/socket/rubysocket.h: include addrinfo.h only when using our own
View
@@ -24,9 +24,7 @@ def exec_command type, file, w
end
def benchmark cmd
- rubybin = ENV['RUBY'] || File.join(
- RbConfig::CONFIG["bindir"],
- RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"])
+ rubybin = ENV['RUBY'] || RbConfig.ruby
IO.popen(rubybin, 'r+'){|io|
io.write cmd
View
@@ -5,9 +5,7 @@
require 'benchmark'
require 'rbconfig'
-$rubybin = ENV['RUBY'] || File.join(
- RbConfig::CONFIG["bindir"],
- RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"])
+$rubybin = ENV['RUBY'] || RbConfig.ruby
def runfile file
puts file
@@ -17,9 +17,7 @@ module WEBrick
module HTTPServlet
class CGIHandler < AbstractServlet
- Ruby = File::join(RbConfig::CONFIG['bindir'],
- RbConfig::CONFIG['ruby_install_name'])
- Ruby << RbConfig::CONFIG['EXEEXT']
+ Ruby = RbConfig.ruby
CGIRunner = "\"#{Ruby}\" \"#{WEBrick::Config::LIBDIR}/httpservlet/cgi_runner.rb\""
def initialize(server, name)
View
@@ -22,10 +22,7 @@ def rubybin
end
begin
require "rbconfig"
- File.join(
- RbConfig::CONFIG["bindir"],
- RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"]
- )
+ RbConfig.ruby
rescue LoadError
"ruby"
end
View
@@ -3,9 +3,7 @@
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{
View
@@ -201,6 +201,14 @@ def RbConfig::expand(val, config = CONFIG)
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

0 comments on commit c0b4e90

Please sign in to comment.