Skip to content

Conversation

@mauro-oto
Copy link
Contributor

If a Ruby stacktrace includes two syntax errors, like below:

➜  dead_end git:(main) ✗ ruby dog.rb
dog.rb:5: syntax error, unexpected `end', expecting ']'
    end
dog.rb:10: syntax error, unexpected end-of-input, expecting `end'

We should parse only the first time we encounter errors, and not the second
time. If we know the type of error and unmatched symbol, we shouldn't need to
check those again.

If a Ruby stacktrace includes two syntax errors, like below:

```
➜  dead_end git:(main) ✗ ruby dog.rb
dog.rb:5: syntax error, unexpected `end', expecting ']'
    end
dog.rb:10: syntax error, unexpected end-of-input, expecting `end'
```

We should parse only the first time we encounter errors, and not the second
time. If we know the type of error and unmatched symbol, we shouldn't need to
check those again.
@mauro-oto mauro-oto force-pushed the do-not-parse-second-error-if-available branch from f506cc9 to 9fdd6e6 Compare February 10, 2021 03:45
@mauro-oto
Copy link
Contributor Author

On hold for a bit until we figure out how to work with multiple syntax errors: https://bugs.ruby-lang.org/issues/17621

@schneems
Copy link
Collaborator

Sounds good. Thanks!

@schneems schneems merged commit bcdcdb9 into main Feb 11, 2021
@schneems
Copy link
Collaborator

thanks!

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.

3 participants