Skip to content

Commit

Permalink
* runruby.rb: use RbConfig::CONFIG instead of Config::CONFIG.
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
akr committed Apr 30, 2009
1 parent 587082d commit d5bfa31
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 15 deletions.
22 changes: 22 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
Thu Apr 30 21:23:30 2009 Tanaka Akira <[email protected]>

* 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 <[email protected]>

* lib/net/http.rb: documentation typo fixed. [ruby-core:23335]
Expand Down
4 changes: 2 additions & 2 deletions benchmark/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def exec_command type, file, w

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
Expand Down
4 changes: 2 additions & 2 deletions benchmark/runc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
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
Expand Down
2 changes: 1 addition & 1 deletion instruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def $mflags.defined?(var)
$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
Expand Down
2 changes: 1 addition & 1 deletion runruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

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)
Expand Down
2 changes: 1 addition & 1 deletion spec/default.mspec
Original file line number Diff line number Diff line change
Expand Up @@ -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']}")
Expand Down
2 changes: 1 addition & 1 deletion test/rubygems/test_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class TestConfig < RubyGemTestCase

def test_datadir
datadir = Config::CONFIG['datadir']
datadir = RbConfig::CONFIG['datadir']
assert_equal "#{datadir}/xyz", Config.datadir('xyz')
end

Expand Down
2 changes: 1 addition & 1 deletion test/rubygems/test_gem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def test_self_bindir_default_dir
bindir = if defined?(RUBY_FRAMEWORK_VERSION) then
'/usr/bin'
else
Config::CONFIG['bindir']
RbConfig::CONFIG['bindir']
end

assert_equal bindir, Gem.bindir(default)
Expand Down
6 changes: 3 additions & 3 deletions test/rubygems/test_gem_platform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,16 @@ def test_initialize_command_line
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]

platform = Gem::Platform.new 'i386-mswin32'

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
Expand Down
4 changes: 2 additions & 2 deletions tool/eval.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
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{
Expand Down
2 changes: 1 addition & 1 deletion yarvtest/yarvtest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
else
$ruby = 'miniruby'
end
$matzruby = Config::CONFIG['ruby_install_name']
$matzruby = RbConfig::CONFIG['ruby_install_name']

ARGV.each{|opt|
if /\Aruby=(.+)/ =~ opt
Expand Down

0 comments on commit d5bfa31

Please sign in to comment.