зеркало из https://github.com/github/ruby.git
* 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:
Родитель
3f9d4f1fbd
Коммит
32bbcc6d52
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче