summaryrefslogtreecommitdiff
path: root/mkconfig.rb
diff options
context:
space:
mode:
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