🌟
[Bug #20726] shareable_constant_value: literal + [a: obj] のバグ報告
[Bug #20726] Issue with hash without braces when assigned to constant with ractor literals
-
shareable_constant_value: literal
のときに[a: obj]
のようなコードがあるとcompile error
になるというバグ報告
# shareable_constant_value: literal
A = [a: 1]
p A
__END__
output:
-- raw disasm--------
trace: 1
0000 newarray 1 ( 2)
0002 putspecialobject 3 ( 2)
* 0004 setconstant :A ( 2)
trace: 1
0006 putself ( 3)
0007 opt_getconstant_path [:A] ( 3)
0009 opt_send_without_block <calldata:p, 1> ( 3)
0011 leave ( 3)
---------------------
test.rb:2: argument stack underflow (-1)
test.rb: compile error (SyntaxError)
-
[{a: 1}]
だと問題ないのとPrism
のパーサーだと再現しなかったのでparse.y
特有ぽいですかね?
Discussion