diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-06 15:39:27 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-06 15:39:27 +0000 |
commit | aab018f8febefe2171d97d40c11a85a4c7b3fbf1 (patch) | |
tree | 61854e90187bf725560cd43a6b351f520a6df87e | |
parent | 2ab094ba4dc078747bf2393693aca88cbeb99735 (diff) | |
download | ruby-aab018f8febefe2171d97d40c11a85a4c7b3fbf1.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | parse.y | 8 |
2 files changed, 13 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Wed Jul 6 23:13:19 2011 Yukihiro Matsumoto <matz@ruby-lang.org> + + * 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@tubusu.net> * test/cgi/test_cgi_header.rb(test_cgi_header_nph): Validate date in @@ -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 |