summaryrefslogtreecommitdiff
path: root/tool/mkconfig.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-23 21:08:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-23 21:08:19 +0000
commit89339af9c19c28eaa9e2814fb75aa09768971f0e (patch)
tree12665d8e36b58d3d44b4e6d305fade4cc7ab79c2 /tool/mkconfig.rb
parent0d5b1718c2f5fdbcd7f06aec6f6ac0fbac5a81ac (diff)
* include/ruby/version.h (RUBY_API_VERSION_*): renamed and moved
from version.h. [ruby-dev:42103] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/mkconfig.rb')
-rwxr-xr-xtool/mkconfig.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
index 07d6982..da636c9 100755
--- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb
@@ -144,9 +144,16 @@ print " CONFIG[\"DESTDIR\"] = DESTDIR\n"
versions = {}
IO.foreach(File.join(srcdir, "version.h")) do |l|
- m = /^\s*#\s*define\s+RUBY_(VERSION_(MAJOR|MINOR|TEENY)|PATCHLEVEL)\s+(-?\d+)/.match(l)
+ m = /^\s*#\s*define\s+RUBY_(PATCHLEVEL)\s+(-?\d+)/.match(l)
if m
- versions[m[2]||m[1]] = m[3]
+ versions[m[1]] = m[2]
+ break
+ end
+end
+IO.foreach(File.join(srcdir, "include/ruby/version.h")) do |l|
+ m = /^\s*#\s*define\s+RUBY_API_VERSION_(MAJOR|MINOR|TEENY)\s+(-?\d+)/.match(l)
+ if m
+ versions[m[1]] = m[2]
break if versions.size == 4
end
end