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

Remove useless variable declarations in trailing position #11704

Merged

Conversation

HertzDevil
Copy link
Contributor

This is a very small subset of #6055 concerned with new variables that become out of scope as soon as they are declared.

There is one behaviour change here: Socket#close_on_exec= now actually calls Crystal::System::Socket#system_close_on_exec=. The standard library doesn't use this method, but this fix seems correct because IO::FileDescriptor does the same.

@HertzDevil HertzDevil added kind:bug A bug in the code. Does not apply to documentation, specs, etc. kind:refactor labels Jan 5, 2022
@straight-shoota straight-shoota modified the milestones: 1.4.0, 1.3.1 Jan 6, 2022
@straight-shoota straight-shoota merged commit c783cc4 into crystal-lang:master Jan 13, 2022
@HertzDevil HertzDevil deleted the refactor/trailing-new-vars branch January 14, 2022 07:15
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. kind:refactor topic:stdlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants