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

hyperspec improperly parses block parameters #128

Closed
catmando opened this issue Feb 16, 2019 · 1 comment
Closed

hyperspec improperly parses block parameters #128

catmando opened this issue Feb 16, 2019 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@catmando
Copy link
Contributor

catmando commented Feb 16, 2019

i.e.

[1, [], 2].each do |x|
  puts x
end

gets transmitted to the client side as

[1, [], 2].each do |x, |
  puts x
end

The extra comma has no effect UNLESS the value being passed to a block is an array. (i.e. the second element in the example above)

Problem is easily fixed by setting an opt-in flag when initializing the parser gem, which will produce the correct result.

The down side is that to process the resulting AST tree, we have to upgrade the unparser gem to latest which has a bug #127 but fortunately this problem produces an obvious error, and has an obvious work around.

@catmando catmando modified the milestones: alpha1.5, alpha1.4 Feb 16, 2019
@catmando catmando added the bug Something isn't working label Feb 16, 2019
@catmando catmando modified the milestones: alpha1.4, alpha1.5 Apr 18, 2019
@catmando
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant