ruby-changes:11464
From: nobu <ko1@a...>
Date: Sat, 28 Mar 2009 06:18:40 +0900 (JST)
Subject: [ruby-changes:11464] Ruby:r23089 (trunk): * sprintf.c (GETNAMEARG): remembers named arg is used, to get rid
nobu 2009-03-28 06:18:29 +0900 (Sat, 28 Mar 2009) New Revision: 23089 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23089 Log: * sprintf.c (GETNAMEARG): remembers named arg is used, to get rid of too many arguments warning. Modified files: trunk/ChangeLog trunk/sprintf.c Index: ChangeLog =================================================================== --- ChangeLog (revision 23088) +++ ChangeLog (revision 23089) @@ -1,3 +1,8 @@ +Sat Mar 28 06:18:27 2009 Nobuyoshi Nakada <nobu@r...> + + * sprintf.c (GETNAMEARG): remembers named arg is used, to get rid + of too many arguments warning. + Sat Mar 28 03:16:59 2009 Nobuyoshi Nakada <nobu@r...> * lib/mkmf.rb (link_command, cc_command, cpp_command): should no Index: sprintf.c =================================================================== --- sprintf.c (revision 23088) +++ sprintf.c (revision 23089) @@ -123,7 +123,7 @@ (rb_raise(rb_eArgError, "named after unnumbered(%d)", posarg), 0) : \ posarg == -1 ? \ (rb_raise(rb_eArgError, "named after numbered"), 0) : \ - rb_hash_fetch(get_hash(&hash, argc, argv), id)) + (posarg = -2, rb_hash_lookup(get_hash(&hash, argc, argv), id))) #define GETNUM(n, val) \ for (; p < end && rb_enc_isdigit(*p, enc); p++) { \ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/