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

* mkconfig.rb (patchlevel): config.status may not contain

PATCHLEVEL even if other version numbers exist.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-02-02 22:01:26 +00:00
parent 04ae31eb24
commit 28155915a5
2 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Tue Feb 3 07:01:21 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* mkconfig.rb (patchlevel): config.status may not contain
PATCHLEVEL even if other version numbers exist.
Mon Feb 2 23:43:00 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/raddrinfo.c (Init_addrinfo): add AddrInfo#to_s as an

View file

@ -38,6 +38,7 @@ v_fast = []
v_others = []
vars = {}
has_version = false
has_patchlevel = false
continued_name = nil
continued_line = nil
File.foreach "config.status" do |line|
@ -95,7 +96,12 @@ File.foreach "config.status" do |line|
else
v_others << v
end
has_version = true if name == "MAJOR"
case name
when "MAJOR"
has_version = true
when "PATCHLEVEL"
has_patchlevel = true
end
end
# break if /^CEOF/
end
@ -114,6 +120,8 @@ unless has_version
print " CONFIG[\"MINOR\"] = \"" + $2 + "\"\n"
print " CONFIG[\"TEENY\"] = \"" + $3 + "\"\n"
}
end
unless has_patchlevel
patchlevel = IO.foreach(File.join(srcdir, "version.h")) {|l|
m = /^\s*#\s*define\s+RUBY_PATCHLEVEL\s+(-?\d+)/.match(l) and break m[1]
}