diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-11-19 15:26:19 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-11-19 15:26:19 +0900 |
| commit | 423f872c846d63056ba75f067201ba9c221231d1 (patch) | |
| tree | 3814352ec8935dc8d2ba8643e585490d5a607082 /mrbgems/mruby-compiler/core/parse.y | |
| parent | 87ffab5713a49cef7133eeff7085b9c6a6a427fb (diff) | |
| download | mruby-423f872c846d63056ba75f067201ba9c221231d1.tar.gz mruby-423f872c846d63056ba75f067201ba9c221231d1.zip | |
Need to keep rooms for empty splat; fix #4166
Diffstat (limited to 'mrbgems/mruby-compiler/core/parse.y')
| -rw-r--r-- | mrbgems/mruby-compiler/core/parse.y | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index ac8724377..3a9da3d36 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -2482,6 +2482,7 @@ f_margs : f_marg_list } | f_marg_list ',' tSTAR { + local_add_f(p, 0); $$ = list3($1, (node*)-1, 0); } | f_marg_list ',' tSTAR ',' f_marg_list @@ -2498,11 +2499,16 @@ f_margs : f_marg_list } | tSTAR { + local_add_f(p, 0); $$ = list3(0, (node*)-1, 0); } - | tSTAR ',' f_marg_list + | tSTAR ',' { - $$ = list3(0, (node*)-1, $3); + local_add_f(p, 0); + } + f_marg_list + { + $$ = list3(0, (node*)-1, $4); } ; |
