summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-26 09:09:49 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-26 09:09:49 +0000
commitd6e89e0c4ea7722b7fc59e198f21a03ccaf5a2a6 (patch)
treecaabaf1c284cbcf76b953323f404fd34ed8085a2 /parse.y
parent230be2a7715c55e1b0ff889bb2c77442ff2f0e8c (diff)
* parse.y: comma at the end of line is no longer allowed.
A patch from Yukihiro Matsumoto <matz AT ruby-lang.org>. (fixed #3456). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y16
1 files changed, 12 insertions, 4 deletions
diff --git a/parse.y b/parse.y
index 57ccfc02d6..b1ba220ccb 100644
--- a/parse.y
+++ b/parse.y
@@ -2414,6 +2414,18 @@ opt_paren_args : none
opt_call_args : none
| call_args
+ | args ','
+ {
+ $$ = $1;
+ }
+ | args ',' assocs ','
+ {
+ /*%%%*/
+ $$ = arg_append($1, NEW_HASH($3));
+ /*%
+ $$ = arg_add_assocs($1, $3);
+ %*/
+ }
;
call_args : command
@@ -2487,10 +2499,6 @@ opt_block_arg : ',' block_arg
{
$$ = $2;
}
- | ','
- {
- $$ = 0;
- }
| none
{
$$ = 0;