Actions
Bug #20939
closedWhen using the parse.y parser, it occurs argument stack underflow (-1) if there is processing after the shareable_constant_value: experimental_everything comment and `C = { **{ k: v } }`
Bug #20939:
When using the parse.y parser, it occurs argument stack underflow (-1) if there is processing after the shareable_constant_value: experimental_everything comment and `C = { **{ k: v } }`
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.4.0dev (2024-12-10T03:31:47Z master f12e2622c1) [arm64-darwin23]
Description
The following code will occurs argument stack underflow if it is a parse.y parser.
The following error message is output.
ruby 3.4.0dev (2024-12-06T03:32:20Z master 6ccaa37eb3) [arm64-darwin23]
-- raw disasm--------
trace: 1
0000 putspecialobject 1 ( 2)
0002 putobject :k ( 2)
0004 putself ( 2)
0005 opt_send_without_block <calldata:v, 0> ( 2)
0007 newhash 2 ( 2)
0009 newhash 2 ( 2)
0011 opt_send_without_block <calldata:make_shareable, 1> ( 2)
0013 putspecialobject 3 ( 2)
* 0015 setconstant :C ( 2)
trace: 1
0017 putself ( 3)
0018 opt_getconstant_path [:C] ( 3)
0020 opt_send_without_block <calldata:p, 1> ( 3)
0022 leave ( 3)
---------------------
-e:2: argument stack underflow (-1)
-e: compile error (SyntaxError)
It does not occur in the following cases:
This does not occur in Ruby 3.3:
Actions