ruby e$B%3%^%s%I$N%Q%9L>$rJV$9e(B RbConfig.rubybin e$B$H$$$&%a%=%C%Ie(B
e$B$rMQ0U$9$k$N$O$I$&$G$7$g$&$+!#e(B
e$B8=:_e(B ruby e$B%3%^%s%I$N%Q%9L>$rF@$k$N$K$O!"e(B
File.join(
RbConfig::CONFIG["bindir"],
RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"]
)
e$B$H5-=R$9$kI,MW$,$"$j$^$9!#e(B
e$B$3$l$O$H$F$b3P$($F$$$i$l$J$$$N$G!"e(B(e$B$=$7$Fe(B EXEEXT
e$B$O$$$+$K$be(B
e$BK:$l$=$&$J$N$Ge(B) e$B$R$H$D$N%a%=%C%I$GDs6!$7$F$*$/$N$,$$$$$s$8$ce(B
e$B$J$$$G$7$g$&$+!#e(B
e$B$J$*!"$3$l$,;H$o$l$k%1!<%9$Oe(B ruby e$B$NG[I[$NCf$G>/$J$/$H$be(B
lib/webrick/httpservlet/cgihandler.rb
benchmark/report.rb
benchmark/runc.rb
test/ruby/envutil.rb
tool/eval.rb
e$B$,$"$j$^$9!#e(B
% svn diff --diff-cmd diff -x ‘-u -p’
Index: tool/mkconfig.rb
— tool/mkconfig.rb (revision 25882)
+++ tool/mkconfig.rb (working copy)
@@ -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.rubybin
- 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
Index: lib/webrick/httpservlet/cgihandler.rb
===================================================================
— lib/webrick/httpservlet/cgihandler.rb (revision 25882)
+++ lib/webrick/httpservlet/cgihandler.rb (working copy)
@@ -17,9 +17,7 @@ module WEBrick
module HTTPServletclass CGIHandler < AbstractServlet
-
Ruby = File::join(RbConfig::CONFIG['bindir'],
-
RbConfig::CONFIG['ruby_install_name'])
-
Ruby << RbConfig::CONFIG['EXEEXT']
-
Ruby = RbConfig.rubybin CGIRunner = "\"#{Ruby}\"
“#{WEBrick::Config::LIBDIR}/httpservlet/cgi_runner.rb”"
def initialize(server, name)
Index: benchmark/report.rb
— benchmark/report.rb (revision 25882)
+++ benchmark/report.rb (working copy)
@@ -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.rubybin
IO.popen(rubybin, ‘r+’){|io|
io.write cmd
Index: benchmark/runc.rb
===================================================================
— benchmark/runc.rb (revision 25882)
+++ benchmark/runc.rb (working copy)
@@ -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.rubybin
def runfile file
puts file
Index: tool/eval.rb
— tool/eval.rb (revision 25882)
+++ tool/eval.rb (working copy)
@@ -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.rubybin
OPTIONS = %w{
Index: test/ruby/envutil.rb
— test/ruby/envutil.rb (revision 25882)
+++ test/ruby/envutil.rb (working copy)
@@ -22,10 +22,7 @@ module EnvUtil
end
begin
require “rbconfig”
-
File.join(
-
RbConfig::CONFIG["bindir"],
- RbConfig::CONFIG[“ruby_install_name”] + RbConfig::CONFIG[“EXEEXT”]
-
)
-
rescue LoadErrorRbConfig.rubybin
“ruby”
end