ruby-changes:9723
From: akr <ko1@a...>
Date: Fri, 2 Jan 2009 04:44:51 +0900 (JST)
Subject: [ruby-changes:9723] Ruby:r21264 (trunk): * ext/socket/mkconstants.rb: check duplicates.
akr 2009-01-02 04:43:49 +0900 (Fri, 02 Jan 2009) New Revision: 21264 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21264 Log: * ext/socket/mkconstants.rb: check duplicates. Modified files: trunk/ChangeLog trunk/ext/socket/mkconstants.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 21263) +++ ChangeLog (revision 21264) @@ -1,3 +1,7 @@ +Fri Jan 2 04:40:00 2009 Tanaka Akira <akr@f...> + + * ext/socket/mkconstants.rb: check duplicates. + Fri Jan 2 02:39:08 2009 Tanaka Akira <akr@f...> * ext/socket/socket.c (optname_arg): defined. @@ -113,7 +117,7 @@ Thu Jan 1 15:08:46 2009 Yuki Sonoda (Yugui) <yugui@y...> - * 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 @@ * 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 @@ Sat Dec 27 22:41:02 2008 Nobuyoshi Nakada <nobu@r...> - * 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@n...> @@ -554,7 +558,7 @@ Sat Dec 27 13:36:55 2008 Koichi Sasada <ko1@a...> * 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. Index: ext/socket/mkconstants.rb =================================================================== --- ext/socket/mkconstants.rb (revision 21263) +++ ext/socket/mkconstants.rb (revision 21264) @@ -34,12 +34,14 @@ # 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| -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/