You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
'break' in method context should emit a parse SyntaxError #4990
'break' in method context should emit a parse SyntaxError. We will parse it and then throw a LocalJumpError if we ever run into it.
deffooiffalsebreakendendfoo
The severity is very minor since most people will not write code like this unless they are JRuby-only, but it should not be difficult to track down since it happens during parse time at some point (we just need to find the error message in MRIs source).
In reviewing issues I realize this is working as expected in that we lazily build methods and the building is where the syntax error ends up occuring. As this only affects legacy parser and will not affect prism (which supplies all parse errors including this one) this will not be an issue once we are full time on prism.
Activity
enebo commentedon Apr 5, 2026
In reviewing issues I realize this is working as expected in that we lazily build methods and the building is where the syntax error ends up occuring. As this only affects legacy parser and will not affect prism (which supplies all parse errors including this one) this will not be an issue once we are full time on prism.