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

Does not record else block if not part of a rescue #73

Closed
JoshCheek opened this issue Jul 24, 2016 · 2 comments
Closed

Does not record else block if not part of a rescue #73

JoshCheek opened this issue Jul 24, 2016 · 2 comments

Comments

@JoshCheek
Copy link
Owner

This works as expected, it records the 2 in the else block.

def a
rescue
else 123  # => 123
end       # => :a
a         # => 123

However, if we remove the rescue, it does not record the else.

def a
else 123
end       # => :a
a         # => 123

Looks like Parser omits it from the AST, I opened an issue here.

My initial diagnosis was this, which may still be relevant at some point in the future: Probably an issue with SeeingIsBelieving::WrapExpressions, the test should go here, or somewhere close by. To fix it, probably follow the recursive invocations through this case statement, and figure out where it abandons the else clause.

If this gets fixed, remove this comment from the Readme.

@JoshCheek
Copy link
Owner Author

Fix should have been part of 2.3.1.3 (here).

But it looks like it's still an issue, I opened a second issue here.

@whitequark
Copy link

whitequark commented Oct 8, 2016

The 2nd issue in Parser is fixed now.

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

No branches or pull requests

2 participants