* 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
This commit is contained in:
parent
070489975d
commit
c0b4e90f08
14
ChangeLog
14
ChangeLog
@ -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>
|
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
|
* ext/socket/rubysocket.h: include addrinfo.h only when using our own
|
||||||
|
@ -24,9 +24,7 @@ def exec_command type, file, w
|
|||||||
end
|
end
|
||||||
|
|
||||||
def benchmark cmd
|
def benchmark cmd
|
||||||
rubybin = ENV['RUBY'] || File.join(
|
rubybin = ENV['RUBY'] || RbConfig.ruby
|
||||||
RbConfig::CONFIG["bindir"],
|
|
||||||
RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"])
|
|
||||||
|
|
||||||
IO.popen(rubybin, 'r+'){|io|
|
IO.popen(rubybin, 'r+'){|io|
|
||||||
io.write cmd
|
io.write cmd
|
||||||
|
@ -5,9 +5,7 @@
|
|||||||
require 'benchmark'
|
require 'benchmark'
|
||||||
require 'rbconfig'
|
require 'rbconfig'
|
||||||
|
|
||||||
$rubybin = ENV['RUBY'] || File.join(
|
$rubybin = ENV['RUBY'] || RbConfig.ruby
|
||||||
RbConfig::CONFIG["bindir"],
|
|
||||||
RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"])
|
|
||||||
|
|
||||||
def runfile file
|
def runfile file
|
||||||
puts file
|
puts file
|
||||||
|
@ -17,9 +17,7 @@ module WEBrick
|
|||||||
module HTTPServlet
|
module HTTPServlet
|
||||||
|
|
||||||
class CGIHandler < AbstractServlet
|
class CGIHandler < AbstractServlet
|
||||||
Ruby = File::join(RbConfig::CONFIG['bindir'],
|
Ruby = RbConfig.ruby
|
||||||
RbConfig::CONFIG['ruby_install_name'])
|
|
||||||
Ruby << RbConfig::CONFIG['EXEEXT']
|
|
||||||
CGIRunner = "\"#{Ruby}\" \"#{WEBrick::Config::LIBDIR}/httpservlet/cgi_runner.rb\""
|
CGIRunner = "\"#{Ruby}\" \"#{WEBrick::Config::LIBDIR}/httpservlet/cgi_runner.rb\""
|
||||||
|
|
||||||
def initialize(server, name)
|
def initialize(server, name)
|
||||||
|
@ -22,10 +22,7 @@ module EnvUtil
|
|||||||
end
|
end
|
||||||
begin
|
begin
|
||||||
require "rbconfig"
|
require "rbconfig"
|
||||||
File.join(
|
RbConfig.ruby
|
||||||
RbConfig::CONFIG["bindir"],
|
|
||||||
RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"]
|
|
||||||
)
|
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
"ruby"
|
"ruby"
|
||||||
end
|
end
|
||||||
|
@ -3,9 +3,7 @@ require 'rbconfig'
|
|||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
require 'pp'
|
require 'pp'
|
||||||
|
|
||||||
Ruby = ENV['RUBY'] ||
|
Ruby = ENV['RUBY'] || RbConfig.ruby
|
||||||
File.join(RbConfig::CONFIG["bindir"],
|
|
||||||
RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"])
|
|
||||||
#
|
#
|
||||||
|
|
||||||
OPTIONS = %w{
|
OPTIONS = %w{
|
||||||
|
@ -201,6 +201,14 @@ print <<EOS
|
|||||||
CONFIG.each_value do |val|
|
CONFIG.each_value do |val|
|
||||||
RbConfig::expand(val)
|
RbConfig::expand(val)
|
||||||
end
|
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
|
end
|
||||||
Config = RbConfig # compatibility for ruby-1.8.4 and older.
|
Config = RbConfig # compatibility for ruby-1.8.4 and older.
|
||||||
CROSS_COMPILING = nil unless defined? CROSS_COMPILING
|
CROSS_COMPILING = nil unless defined? CROSS_COMPILING
|
||||||
|
Loading…
x
Reference in New Issue
Block a user