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

Fix trailing rescue syntax #11083

Merged

Conversation

straight-shoota
Copy link
Member

This syntax is used incorrectly due to confusion with block rescue syntax where rescue IO::Error means rescuing an exception of type IO::Error.

In this case, expr rescue IO::Error means if expr raises, the value becomes IO::Error.

See #11017 (comment)

@straight-shoota straight-shoota added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:networking labels Aug 12, 2021
Copy link
Member

@sdogruyol sdogruyol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @straight-shoota 🙏

@straight-shoota straight-shoota added this to the 1.2.0 milestone Aug 12, 2021
@straight-shoota straight-shoota merged commit 5bd23c7 into crystal-lang:master Aug 13, 2021
@straight-shoota straight-shoota deleted the fix/trailing-rescue branch August 13, 2021 21:33
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:stdlib:networking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants