summaryrefslogtreecommitdiff
path: root/win32/resource.rb
diff options
context:
space:
mode:
Diffstat (limited to 'win32/resource.rb')
-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')