aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y7
1 files changed, 6 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 8dcdf0646d..e4c419ea61 100644
--- a/parse.y
+++ b/parse.y
@@ -4169,7 +4169,12 @@ f_rest_arg : restarg_mark tIDENTIFIER
| restarg_mark
{
/*%%%*/
- $$ = (NODE*)Qnil;
+ if (dyna_in_block()) {
+ $$ = NEW_DASGN_CURR(internal_id(), 0);
+ }
+ else {
+ $$ = NEW_NODE(NODE_LASGN,0,0,local_append(0));
+ }
/*%
$$ = dispatch1(restparam, Qnil);
%*/