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

* ext/socket/mkconstants.rb: don't cause an error for duplicate names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2009-01-17 05:53:05 +00:00
parent 3f9d4f1fbd
commit 32bbcc6d52
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Sat Jan 17 14:52:27 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/mkconstants.rb: don't cause an error for duplicate names.
Sat Jan 17 12:46:17 2009 Tanaka Akira <akr@fsij.org>
* ext/socket: split files for each class.

View file

@ -38,7 +38,10 @@ h = {}
DATA.each_line {|s|
name, default_value = s.scan(/\S+/)
next unless name && name[0] != ?#
raise "duplicate name: #{name}" if h.has_key? name
if h.has_key? name
warn "#{$.}: warning: duplicate name: #{name}"
next
end
h[name] = default_value
}
DEFS = h.to_a
@ -465,6 +468,7 @@ SO_ATTACH_FILTER
SO_DETACH_FILTER
SO_PEERNAME
SO_TIMESTAMP
SO_BINTIME
SOPRI_INTERACTIVE
SOPRI_NORMAL