1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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`
This commit is contained in:
yui-knk 2022-10-08 18:53:41 +09:00 committed by Yuichiro Kaneko
parent 0f231f2bab
commit 50f5223236
Notes: git 2022-10-08 22:33:08 +09:00

View file

@ -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) %*/
}