mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* runruby.rb: use RbConfig::CONFIG instead of Config::CONFIG.
* spec/default.mspec: ditto. * yarvtest/yarvtest.rb: ditto. * instruby.rb: ditto. * benchmark/report.rb: ditto. * benchmark/runc.rb: ditto. * tool/eval.rb: ditto. * test/rubygems/test_gem.rb: ditto. * test/rubygems/test_config.rb: ditto. * test/rubygems/test_gem_platform.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
587082d57c
commit
d5bfa31f82
11 changed files with 37 additions and 15 deletions
22
ChangeLog
22
ChangeLog
|
@ -1,3 +1,25 @@
|
|||
Thu Apr 30 21:23:30 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* runruby.rb: use RbConfig::CONFIG instead of Config::CONFIG.
|
||||
|
||||
* spec/default.mspec: ditto.
|
||||
|
||||
* yarvtest/yarvtest.rb: ditto.
|
||||
|
||||
* instruby.rb: ditto.
|
||||
|
||||
* benchmark/report.rb: ditto.
|
||||
|
||||
* benchmark/runc.rb: ditto.
|
||||
|
||||
* tool/eval.rb: ditto.
|
||||
|
||||
* test/rubygems/test_gem.rb: ditto.
|
||||
|
||||
* test/rubygems/test_config.rb: ditto.
|
||||
|
||||
* test/rubygems/test_gem_platform.rb: ditto.
|
||||
|
||||
Thu Apr 30 18:18:13 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* lib/net/http.rb: documentation typo fixed. [ruby-core:23335]
|
||||
|
|
|
@ -25,8 +25,8 @@ end
|
|||
|
||||
def benchmark cmd
|
||||
rubybin = ENV['RUBY'] || File.join(
|
||||
Config::CONFIG["bindir"],
|
||||
Config::CONFIG["ruby_install_name"] + Config::CONFIG["EXEEXT"])
|
||||
RbConfig::CONFIG["bindir"],
|
||||
RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"])
|
||||
|
||||
IO.popen(rubybin, 'r+'){|io|
|
||||
io.write cmd
|
||||
|
|
|
@ -6,8 +6,8 @@ require 'benchmark'
|
|||
require 'rbconfig'
|
||||
|
||||
$rubybin = ENV['RUBY'] || File.join(
|
||||
Config::CONFIG["bindir"],
|
||||
Config::CONFIG["ruby_install_name"] + Config::CONFIG["EXEEXT"])
|
||||
RbConfig::CONFIG["bindir"],
|
||||
RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"])
|
||||
|
||||
def runfile file
|
||||
puts file
|
||||
|
|
|
@ -107,7 +107,7 @@ def parse_args(argv = ARGV)
|
|||
$continue = $mflags.set?(?k)
|
||||
|
||||
if $installed_list ||= $mflags.defined?('INSTALLED_LIST')
|
||||
Config.expand($installed_list, Config::CONFIG)
|
||||
Config.expand($installed_list, RbConfig::CONFIG)
|
||||
$installed_list = open($installed_list, "ab")
|
||||
$installed_list.sync = true
|
||||
end
|
||||
|
|
|
@ -41,7 +41,7 @@ $:.unshift(abs_archdir)
|
|||
|
||||
config = File.read(conffile = File.join(abs_archdir, 'rbconfig.rb'))
|
||||
config.sub!(/^(\s*)RUBY_VERSION\s*==.*(\sor\s*)$/, '\1true\2')
|
||||
config = Module.new {module_eval(config, conffile)}::Config::CONFIG
|
||||
config = Module.new {module_eval(config, conffile)}::RbConfig::CONFIG
|
||||
|
||||
ruby = File.join(archdir, config["RUBY_INSTALL_NAME"]+config['EXEEXT'])
|
||||
unless File.exist?(ruby)
|
||||
|
|
|
@ -7,7 +7,7 @@ class MSpecScript
|
|||
f.read[/^\s*srcdir\s*=\s*(.+)/i] and srcdir = $1
|
||||
}
|
||||
end
|
||||
config = proc{|name| `#{builddir}/miniruby -I#{srcdir} -rrbconfig -e 'print Config::CONFIG["#{name}"]'`}
|
||||
config = proc{|name| `#{builddir}/miniruby -I#{srcdir} -rrbconfig -e 'print RbConfig::CONFIG["#{name}"]'`}
|
||||
|
||||
# The default implementation to run the specs.
|
||||
set :target, File.join(builddir, "miniruby#{config['exeext']}")
|
||||
|
|
|
@ -11,7 +11,7 @@ require 'rubygems'
|
|||
class TestConfig < RubyGemTestCase
|
||||
|
||||
def test_datadir
|
||||
datadir = Config::CONFIG['datadir']
|
||||
datadir = RbConfig::CONFIG['datadir']
|
||||
assert_equal "#{datadir}/xyz", Config.datadir('xyz')
|
||||
end
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class TestGem < RubyGemTestCase
|
|||
bindir = if defined?(RUBY_FRAMEWORK_VERSION) then
|
||||
'/usr/bin'
|
||||
else
|
||||
Config::CONFIG['bindir']
|
||||
RbConfig::CONFIG['bindir']
|
||||
end
|
||||
|
||||
assert_equal bindir, Gem.bindir(default)
|
||||
|
|
|
@ -100,8 +100,8 @@ class TestGemPlatform < RubyGemTestCase
|
|||
end
|
||||
|
||||
def test_initialize_mswin32_vc6
|
||||
orig_RUBY_SO_NAME = Config::CONFIG['RUBY_SO_NAME']
|
||||
Config::CONFIG['RUBY_SO_NAME'] = 'msvcrt-ruby18'
|
||||
orig_RUBY_SO_NAME = RbConfig::CONFIG['RUBY_SO_NAME']
|
||||
RbConfig::CONFIG['RUBY_SO_NAME'] = 'msvcrt-ruby18'
|
||||
|
||||
expected = ['x86', 'mswin32', nil]
|
||||
|
||||
|
@ -109,7 +109,7 @@ class TestGemPlatform < RubyGemTestCase
|
|||
|
||||
assert_equal expected, platform.to_a, 'i386-mswin32 VC6'
|
||||
ensure
|
||||
Config::CONFIG['RUBY_SO_NAME'] = orig_RUBY_SO_NAME
|
||||
RbConfig::CONFIG['RUBY_SO_NAME'] = orig_RUBY_SO_NAME
|
||||
end
|
||||
|
||||
def test_initialize_platform
|
||||
|
|
|
@ -4,8 +4,8 @@ require 'fileutils'
|
|||
require 'pp'
|
||||
|
||||
Ruby = ENV['RUBY'] ||
|
||||
File.join(Config::CONFIG["bindir"],
|
||||
Config::CONFIG["ruby_install_name"] + Config::CONFIG["EXEEXT"])
|
||||
File.join(RbConfig::CONFIG["bindir"],
|
||||
RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"])
|
||||
#
|
||||
|
||||
OPTIONS = %w{
|
||||
|
|
|
@ -7,7 +7,7 @@ if /mswin32/ !~ RUBY_PLATFORM
|
|||
else
|
||||
$ruby = 'miniruby'
|
||||
end
|
||||
$matzruby = Config::CONFIG['ruby_install_name']
|
||||
$matzruby = RbConfig::CONFIG['ruby_install_name']
|
||||
|
||||
ARGV.each{|opt|
|
||||
if /\Aruby=(.+)/ =~ opt
|
||||
|
|
Loading…
Reference in a new issue