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

Parser should require comma between block args #7342

Closed
bcardiff opened this issue Jan 28, 2019 · 0 comments
Closed

Parser should require comma between block args #7342

bcardiff opened this issue Jan 28, 2019 · 0 comments
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:parser

Comments

@bcardiff
Copy link
Member

The following code compiles and evaluates to 1

def foo
  yield 0, 1
end

foo do |x y|
  y
end

Even if the comma is missing in do |x y|.
But the formatter will remove that space leaving it as do |xy| which wont compile.
I think the parser should be more strict in this case.

@bcardiff bcardiff added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:parser labels Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:parser
Projects
None yet
Development

No branches or pull requests

1 participant