Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'break' in method context should emit a parse SyntaxError #4990

Open
enebo opened this issue Jan 18, 2018 · 0 comments
Open

'break' in method context should emit a parse SyntaxError #4990

enebo opened this issue Jan 18, 2018 · 0 comments
Labels

Comments

@enebo
Copy link
Member

enebo commented Jan 18, 2018

'break' in method context should emit a parse SyntaxError. We will parse it and then throw a LocalJumpError if we ever run into it.

def foo
  if false
    break
  end
end

foo

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant