1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
usa 2009-02-02 08:14:06 +00:00
parent 29bd89281b
commit b204d48f76
3 changed files with 11 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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')