diff options
author | yui-knk <spiketeika@gmail.com> | 2022-10-08 18:53:41 +0900 |
---|---|---|
committer | Yuichiro Kaneko <spiketeika@gmail.com> | 2022-10-08 22:30:50 +0900 |
commit | 50f5223236704c75c827d0a745fc934ad9c86277 (patch) | |
tree | cef8bef0382c4950bfc4b0552eabc8e9b6877cb1 /parse.y | |
parent | 0f231f2babf314593bcd233f4f5b8de8dc936145 (diff) | |
download | ruby-50f5223236704c75c827d0a745fc934ad9c86277.tar.gz |
Fix SEGV of dump parsetree
Assign internal_id to semantic value so that dump parsetree option
can render the tree for these codes without SEGV.
* `def m(&); end`
* `def m(*); end`
* `def m(**); end`
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -5602,6 +5602,7 @@ f_kwrest : kwrest_mark tIDENTIFIER { arg_var(p, ANON_KEYWORD_REST_ID); /*%%%*/ + $$ = internal_id(p); /*% %*/ /*% ripper: kwrest_param!(Qnil) %*/ } @@ -5677,6 +5678,7 @@ f_rest_arg : restarg_mark tIDENTIFIER { arg_var(p, ANON_REST_ID); /*%%%*/ + $$ = internal_id(p); /*% %*/ /*% ripper: rest_param!(Qnil) %*/ } @@ -5698,6 +5700,7 @@ f_block_arg : blkarg_mark tIDENTIFIER { arg_var(p, ANON_BLOCK_ID); /*%%%*/ + $$ = internal_id(p); /*% %*/ /*% ripper: blockarg!(Qnil) %*/ } |