summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-06 15:39:27 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-06 15:39:27 +0000
commitaab018f8febefe2171d97d40c11a85a4c7b3fbf1 (patch)
tree61854e90187bf725560cd43a6b351f520a6df87e /parse.y
parent2ab094ba4dc078747bf2393693aca88cbeb99735 (diff)
* parse.y (opt_call_args): allow trailing comma after assoc
argument e.g. 'foo(bar:1,)'. fixed #3456 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y8
1 files changed, 8 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index c3db298e8a..f1663ef21f 100644
--- a/parse.y
+++ b/parse.y
@@ -2426,6 +2426,14 @@ opt_call_args : none
$$ = arg_add_assocs($1, $3);
%*/
}
+ | assocs ','
+ {
+ /*%%%*/
+ $$ = NEW_LIST(NEW_HASH($1));
+ /*%
+ $$ = arg_add_assocs(arg_new(), $1);
+ %*/
+ }
;
call_args : command