summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-02 08:14:06 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-02 08:14:06 +0000
commitb204d48f76b92d62c3940cfc17bdb68156e5f5f2 (patch)
treea2942de305669a58259eeb62cf7cb4d46d8d759b /win32
parent29bd89281b296a1f72ed50936028ce88a8e3a736 (diff)
* mkconfig.rb: patchlevel is somtimes minus.
* win32/resource.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rwxr-xr-xwin32/resource.rb7
1 files changed, 4 insertions, 3 deletions
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')