diff options
| author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-15 06:25:42 +0000 |
|---|---|---|
| committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-15 06:25:42 +0000 |
| commit | c2052b027c8e4c8e95bb34e93b2e745a79eaaceb (patch) | |
| tree | c8bbaef5cff6e85dddb35d2efe7ed254b4310126 /parse.y | |
| parent | 53c6960ddf6101f2711c5804a2842c3640a49c9c (diff) | |
parse.y: Fix a bug of `obj[42, &blk] ||= foo bar`
Follow up of r28123 (!)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1298,7 +1298,12 @@ command_asgn : lhs '=' command_rhs value_expr($6); $3 = make_array($3, &@3); - args = arg_concat(p, $3, $6, &@$); + if (nd_type($3) == NODE_BLOCK_PASS) { + args = NEW_ARGSCAT($3, $6, &@$); + } + else { + args = arg_concat(p, $3, $6, &@$); + } $$ = NEW_OP_ASGN1($1, $5, args, &@$); fixpos($$, $1); /*% |
