summaryrefslogtreecommitdiff
path: root/mkconfig.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-20 08:34:53 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-20 08:34:53 +0000
commit04946de81b657c439c46f3f3780182b3cc7f4821 (patch)
tree6a57539965332280eabf8a66736b066052e73142 /mkconfig.rb
parent2d956bea23588a9a16a0d42149d8544e9a049689 (diff)
* mkconfig.rb: generate RbConfig instead of Config.
* instruby.rb, rubytest.rb, runruby.rb, bcc32/Makefile.sub, ext/extmk.rb, ext/dl/extconf.rb, ext/iconv/charset_alias.rb, lib/mkmf.rb, lib/rdoc/ri/ri_paths.rb, lib/webrick/httpservlet/cgihandler.rb, test/dbm/test_dbm.rb, test/gdbm/test_gdbm.rb, test/ruby/envutil.rb, test/soap/calc/test_calc_cgi.rb, test/soap/header/test_authheader_cgi.rb, test/soap/ssl/test_ssl.rb, win32/mkexports.rb, win32/resource.rb: Use RbConfig instead of Config. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mkconfig.rb')
-rw-r--r--mkconfig.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/mkconfig.rb b/mkconfig.rb
index 0060b608b3..29139c5716 100644
--- a/mkconfig.rb
+++ b/mkconfig.rb
@@ -26,7 +26,7 @@ print %[
# This file was created by #{mkconfig} when ruby was built. Any
# changes made to this file will be lost the next time ruby is built.
-module Config
+module RbConfig
RUBY_VERSION == "#{version}" or
raise "ruby lib version (#{version}) doesn't match executable version (\#{RUBY_VERSION})"
@@ -116,14 +116,14 @@ print <<EOS
CONFIG["topdir"] = File.dirname(__FILE__)
MAKEFILE_CONFIG = {}
CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
- def Config::expand(val, config = CONFIG)
+ def RbConfig::expand(val, config = CONFIG)
val.gsub!(/\\$\\$|\\$\\(([^()]+)\\)|\\$\\{([^{}]+)\\}/) do |var|
if !(v = $1 || $2)
'$'
elsif key = config[v = v[/\\A[^:]+(?=(?::(.*?)=(.*))?\\z)/]]
pat, sub = $1, $2
config[v] = false
- Config::expand(key, config)
+ RbConfig::expand(key, config)
config[v] = key
key = key.gsub(/\#{Regexp.quote(pat)}(?=\\s|\\z)/n) {sub} if pat
key
@@ -134,7 +134,7 @@ print <<EOS
val
end
CONFIG.each_value do |val|
- Config::expand(val)
+ RbConfig::expand(val)
end
end
CROSS_COMPILING = nil unless defined? CROSS_COMPILING