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:
parent
0f231f2bab
commit
50f5223236
Notes:
git
2022-10-08 22:33:08 +09:00
1 changed files with 3 additions and 0 deletions
3
parse.y
3
parse.y
|
@ -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) %*/
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue