parser icon indicating copy to clipboard operation
parser copied to clipboard

Pattern accepted by parser but rejected by MRI

Open mbj opened this issue 2 years ago • 0 comments

In reference to: https://github.com/mbj/unparser/issues/340#issue-1642655373, it appears that parser currently accepts syntax that is rejected in MRI:

case foo
in {"#{"a"}": 1}
end

This is accepted in recent parser releases, in ruby version 2.7 to 3.2. Also accepted by MRI 2.7, but rejected 3.0-3.2.

I think we should adapt the parser grammars for 3.0+ to reject this also. Thanks to @kddnewton for reporting in unparser.

mbj avatar Mar 27 '23 19:03 mbj