Skip to content

Conversation

@vinistock
Copy link
Contributor

In on_else, the index of the last end or ensure token could potentially be nil on some cases, which led to trying to dereference the tokens array with nil - resulting in no implicit conversion of nil into integer.

This PR just raises a ParseError instead, pointing to the else token.

@kddnewton kddnewton merged commit 3e07be7 into ruby-syntax-tree:main Oct 11, 2022
@vinistock vinistock deleted the vs/raise_parse_error_on_else_missing_end branch October 11, 2022 18:25
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

Successfully merging this pull request may close these issues.

2 participants