summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rwxr-xr-xmkconfig.rb2
-rwxr-xr-xwin32/resource.rb7
3 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index c27111d309e..5a1de3f5ce3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Feb 2 17:13:46 2009 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * mkconfig.rb: patchlevel is somtimes minus.
+
+ * win32/resource.rb: ditto.
+
Mon Feb 2 17:11:23 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/ancdata.c (cmsg_type_to_sym): add #ifdef for no IPv6
diff --git a/mkconfig.rb b/mkconfig.rb
index d6a9d039867..49f892042bd 100755
--- a/mkconfig.rb
+++ b/mkconfig.rb
@@ -115,7 +115,7 @@ unless has_version
print " CONFIG[\"TEENY\"] = \"" + $3 + "\"\n"
}
patchlevel = IO.foreach(File.join(srcdir, "version.h")) {|l|
- m = /^\s*#\s*define\s+RUBY_PATCHLEVEL\s+(\d+)/.match(l) and break m[1]
+ m = /^\s*#\s*define\s+RUBY_PATCHLEVEL\s+(-?\d+)/.match(l) and break m[1]
}
print " CONFIG[\"PATCHLEVEL\"] = \"#{patchlevel}\"\n"
end
diff --git a/win32/resource.rb b/win32/resource.rb
index 40886cb5e5b..06b0aca7af4 100755
--- a/win32/resource.rb
+++ b/win32/resource.rb
@@ -4,9 +4,10 @@ require 'rbconfig'
CONFIG = RbConfig::MAKEFILE_CONFIG
-version = %w'MAJOR MINOR TEENY PATCHLEVEL'.map{|v| CONFIG[v] || '0'}
-nversion = version.join(',')
-sversion = version.join('.')
+version = %w'MAJOR MINOR TEENY'.map{|v| CONFIG[v] || '0'}
+patch = CONFIG['PATCHLEVEL']
+nversion = (version + [patch.to_i < 0 ? '0' : patch]).join(',')
+sversion = version.join('.') + (patch.to_i < 0 ? 'dev' : "p#{patch}")
$ruby_name ||= CONFIG["RUBY_INSTALL_NAME"]
$rubyw_name ||= CONFIG["RUBYW_INSTALL_NAME"] || $ruby_name.sub(/ruby/, '\&w')