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>
|
Thu Apr 30 18:18:13 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* lib/net/http.rb: documentation typo fixed. [ruby-core:23335]
|
* lib/net/http.rb: documentation typo fixed. [ruby-core:23335]
|
||||||
|
|
|
@ -25,8 +25,8 @@ end
|
||||||
|
|
||||||
def benchmark cmd
|
def benchmark cmd
|
||||||
rubybin = ENV['RUBY'] || File.join(
|
rubybin = ENV['RUBY'] || File.join(
|
||||||
Config::CONFIG["bindir"],
|
RbConfig::CONFIG["bindir"],
|
||||||
Config::CONFIG["ruby_install_name"] + Config::CONFIG["EXEEXT"])
|
RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"])
|
||||||
|
|
||||||
IO.popen(rubybin, 'r+'){|io|
|
IO.popen(rubybin, 'r+'){|io|
|
||||||
io.write cmd
|
io.write cmd
|
||||||
|
|
|
@ -6,8 +6,8 @@ require 'benchmark'
|
||||||
require 'rbconfig'
|
require 'rbconfig'
|
||||||
|
|
||||||
$rubybin = ENV['RUBY'] || File.join(
|
$rubybin = ENV['RUBY'] || File.join(
|
||||||
Config::CONFIG["bindir"],
|
RbConfig::CONFIG["bindir"],
|
||||||
Config::CONFIG["ruby_install_name"] + Config::CONFIG["EXEEXT"])
|
RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"])
|
||||||
|
|
||||||
def runfile file
|
def runfile file
|
||||||
puts file
|
puts file
|
||||||
|
|
|
@ -107,7 +107,7 @@ def parse_args(argv = ARGV)
|
||||||
$continue = $mflags.set?(?k)
|
$continue = $mflags.set?(?k)
|
||||||
|
|
||||||
if $installed_list ||= $mflags.defined?('INSTALLED_LIST')
|
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 = open($installed_list, "ab")
|
||||||
$installed_list.sync = true
|
$installed_list.sync = true
|
||||||
end
|
end
|
||||||
|
|
|
@ -41,7 +41,7 @@ $:.unshift(abs_archdir)
|
||||||
|
|
||||||
config = File.read(conffile = File.join(abs_archdir, 'rbconfig.rb'))
|
config = File.read(conffile = File.join(abs_archdir, 'rbconfig.rb'))
|
||||||
config.sub!(/^(\s*)RUBY_VERSION\s*==.*(\sor\s*)$/, '\1true\2')
|
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'])
|
ruby = File.join(archdir, config["RUBY_INSTALL_NAME"]+config['EXEEXT'])
|
||||||
unless File.exist?(ruby)
|
unless File.exist?(ruby)
|
||||||
|
|
|
@ -7,7 +7,7 @@ class MSpecScript
|
||||||
f.read[/^\s*srcdir\s*=\s*(.+)/i] and srcdir = $1
|
f.read[/^\s*srcdir\s*=\s*(.+)/i] and srcdir = $1
|
||||||
}
|
}
|
||||||
end
|
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.
|
# The default implementation to run the specs.
|
||||||
set :target, File.join(builddir, "miniruby#{config['exeext']}")
|
set :target, File.join(builddir, "miniruby#{config['exeext']}")
|
||||||
|
|
|
@ -11,7 +11,7 @@ require 'rubygems'
|
||||||
class TestConfig < RubyGemTestCase
|
class TestConfig < RubyGemTestCase
|
||||||
|
|
||||||
def test_datadir
|
def test_datadir
|
||||||
datadir = Config::CONFIG['datadir']
|
datadir = RbConfig::CONFIG['datadir']
|
||||||
assert_equal "#{datadir}/xyz", Config.datadir('xyz')
|
assert_equal "#{datadir}/xyz", Config.datadir('xyz')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ class TestGem < RubyGemTestCase
|
||||||
bindir = if defined?(RUBY_FRAMEWORK_VERSION) then
|
bindir = if defined?(RUBY_FRAMEWORK_VERSION) then
|
||||||
'/usr/bin'
|
'/usr/bin'
|
||||||
else
|
else
|
||||||
Config::CONFIG['bindir']
|
RbConfig::CONFIG['bindir']
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_equal bindir, Gem.bindir(default)
|
assert_equal bindir, Gem.bindir(default)
|
||||||
|
|
|
@ -100,8 +100,8 @@ class TestGemPlatform < RubyGemTestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_initialize_mswin32_vc6
|
def test_initialize_mswin32_vc6
|
||||||
orig_RUBY_SO_NAME = Config::CONFIG['RUBY_SO_NAME']
|
orig_RUBY_SO_NAME = RbConfig::CONFIG['RUBY_SO_NAME']
|
||||||
Config::CONFIG['RUBY_SO_NAME'] = 'msvcrt-ruby18'
|
RbConfig::CONFIG['RUBY_SO_NAME'] = 'msvcrt-ruby18'
|
||||||
|
|
||||||
expected = ['x86', 'mswin32', nil]
|
expected = ['x86', 'mswin32', nil]
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ class TestGemPlatform < RubyGemTestCase
|
||||||
|
|
||||||
assert_equal expected, platform.to_a, 'i386-mswin32 VC6'
|
assert_equal expected, platform.to_a, 'i386-mswin32 VC6'
|
||||||
ensure
|
ensure
|
||||||
Config::CONFIG['RUBY_SO_NAME'] = orig_RUBY_SO_NAME
|
RbConfig::CONFIG['RUBY_SO_NAME'] = orig_RUBY_SO_NAME
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_initialize_platform
|
def test_initialize_platform
|
||||||
|
|
|
@ -4,8 +4,8 @@ require 'fileutils'
|
||||||
require 'pp'
|
require 'pp'
|
||||||
|
|
||||||
Ruby = ENV['RUBY'] ||
|
Ruby = ENV['RUBY'] ||
|
||||||
File.join(Config::CONFIG["bindir"],
|
File.join(RbConfig::CONFIG["bindir"],
|
||||||
Config::CONFIG["ruby_install_name"] + Config::CONFIG["EXEEXT"])
|
RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"])
|
||||||
#
|
#
|
||||||
|
|
||||||
OPTIONS = %w{
|
OPTIONS = %w{
|
||||||
|
|
|
@ -7,7 +7,7 @@ if /mswin32/ !~ RUBY_PLATFORM
|
||||||
else
|
else
|
||||||
$ruby = 'miniruby'
|
$ruby = 'miniruby'
|
||||||
end
|
end
|
||||||
$matzruby = Config::CONFIG['ruby_install_name']
|
$matzruby = RbConfig::CONFIG['ruby_install_name']
|
||||||
|
|
||||||
ARGV.each{|opt|
|
ARGV.each{|opt|
|
||||||
if /\Aruby=(.+)/ =~ opt
|
if /\Aruby=(.+)/ =~ opt
|
||||||
|
|
Loading…
Reference in a new issue