diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-01 19:43:49 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-01 19:43:49 +0000 |
commit | 0aca84d0884e41217a1d9e2a5532befd2d61a442 (patch) | |
tree | 6ac588c430e5a22ed1dab0ecbe5f8bec343a45e9 | |
parent | eb70912842b06794bcb51f0b3acee0ab4657a43c (diff) | |
download | ruby-0aca84d0884e41217a1d9e2a5532befd2d61a442.tar.gz ruby-0aca84d0884e41217a1d9e2a5532befd2d61a442.tar.xz ruby-0aca84d0884e41217a1d9e2a5532befd2d61a442.zip |
* ext/socket/mkconstants.rb: check duplicates.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | ext/socket/mkconstants.rb | 6 |
2 files changed, 14 insertions, 8 deletions
@@ -1,3 +1,7 @@ +Fri Jan 2 04:40:00 2009 Tanaka Akira <akr@fsij.org> + + * ext/socket/mkconstants.rb: check duplicates. + Fri Jan 2 02:39:08 2009 Tanaka Akira <akr@fsij.org> * ext/socket/socket.c (optname_arg): defined. @@ -113,7 +117,7 @@ Thu Jan 1 16:48:07 2009 Tanaka Akira <akr@fsij.org> Thu Jan 1 15:08:46 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp> - * tool/flie2lastrev.rb: supports git repositories which are cloned + * tool/file2lastrev.rb: supports git repositories which are cloned from a git-svn gateway. Patch by Hongli Lai. [ruby-core:21020] @@ -341,7 +345,7 @@ Mon Dec 29 17:25:17 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp> * bin/erb.rb (ERB::Main.run): adds -E and -U options. String is no longer Enumerable. - * man/erb.1: new manapage. + * man/erb.1: new manpage. * test/erb/test_erb_m17n.rb: new test case for m17n features. @@ -470,10 +474,10 @@ Sun Dec 28 00:43:33 2008 Tanaka Akira <akr@fsij.org> Sat Dec 27 22:41:02 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> - * test/rdoc/test_rdoc_info_formatting.rb (setup, teadown): uses - mktmpdir and removes it alfter the test. + * test/rdoc/test_rdoc_info_formatting.rb (setup, teardown): uses + mktmpdir and removes it after the test. - * test/cgi/test_cgi_session.rb (setup, teadown): ditto. + * test/cgi/test_cgi_session.rb (setup, teardown): ditto. Sat Dec 27 21:46:10 2008 TAKANO Mitsuhiro (takano32) <tak@no32.tk> @@ -554,7 +558,7 @@ Sat Dec 27 14:29:33 2008 Tanaka Akira <akr@fsij.org> Sat Dec 27 13:36:55 2008 Koichi Sasada <ko1@atdot.net> * eval.c (get_errinfo): return th->errinfo value - if normal errinfo place (dynamic local viriable) is not found. + if normal errinfo place (dynamic local variable) is not found. fixes Bug #732 [ruby-dev:37046]. * bootstraptest/test_proc.rb: add a test. diff --git a/ext/socket/mkconstants.rb b/ext/socket/mkconstants.rb index 318ffde67..82718b400 100644 --- a/ext/socket/mkconstants.rb +++ b/ext/socket/mkconstants.rb @@ -34,12 +34,14 @@ result = '' # workaround for NetBSD, OpenBSD and etc. result << "#define pseudo_AF_FTIP pseudo_AF_RTIP\n" -DEFS = [] +h = {} DATA.each_line {|s| name, default_value = s.scan(/\S+/) next unless name && name[0] != ?# - DEFS << [name, default_value] + raise "duplicate name: #{name}" if h.has_key? name + h[name] = default_value } +DEFS = h.to_a def each_const DEFS.each {|name, default_value| |