ruby-changes:20376
From: matz <ko1@a...>
Date: Thu, 7 Jul 2011 00:39:36 +0900 (JST)
Subject: [ruby-changes:20376] matz:r32424 (trunk): * parse.y (opt_call_args): allow trailing comma after assoc
matz 2011-07-07 00:39:27 +0900 (Thu, 07 Jul 2011) New Revision: 32424 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32424 Log: * parse.y (opt_call_args): allow trailing comma after assoc argument e.g. 'foo(bar:1,)'. fixed #3456 Modified files: trunk/ChangeLog trunk/parse.y Index: ChangeLog =================================================================== --- ChangeLog (revision 32423) +++ ChangeLog (revision 32424) @@ -1,3 +1,8 @@ +Wed Jul 6 23:13:19 2011 Yukihiro Matsumoto <matz@r...> + + * parse.y (opt_call_args): allow trailing comma after assoc + argument e.g. 'foo(bar:1,)'. fixed #3456 + Wed Jul 6 22:11:12 2011 Shota Fukumori <sorah@t...> * test/cgi/test_cgi_header.rb(test_cgi_header_nph): Validate date in Index: parse.y =================================================================== --- parse.y (revision 32423) +++ parse.y (revision 32424) @@ -2426,6 +2426,14 @@ $$ = arg_add_assocs($1, $3); %*/ } + | assocs ',' + { + /*%%%*/ + $$ = NEW_LIST(NEW_HASH($1)); + /*% + $$ = arg_add_assocs(arg_new(), $1); + %*/ + } ; call_args : command -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/