summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-01 19:43:49 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-01 19:43:49 +0000
commit28c2711230240fde0a9f66effbbd71108b4b0dfd (patch)
tree6ac588c430e5a22ed1dab0ecbe5f8bec343a45e9
parentaa0ae0d3b6ab8d6c3143960bd0b3d154bd96d10e (diff)
* ext/socket/mkconstants.rb: check duplicates.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog16
-rw-r--r--ext/socket/mkconstants.rb6
2 files changed, 14 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index f530f0080a..145ee91950 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 318ffde678..82718b400e 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|