Actions
Bug #21661
openEndless method definition as a default value of block parameter is wrongly accepted in Prism
Bug #21661:
Endless method definition as a default value of block parameter is wrongly accepted in Prism
ruby -v:
ruby 3.5.0dev (2025-11-01T00:18:01Z master 17a7b4e031) +PRISM [x86_64-linux]
Description
These are syntax error in parse.y but not in Prism.
p do |a = def f = 1; b| end
p do |a = def f = 1| 2; b|c end # `|` inside block parameter
Normal assignment as a default value p do |a = b = 1| end is already syntax error.
No data to display
Actions