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

Lint: Use Object#in? instead of multiple comparisons #12675

Conversation

Sija
Copy link
Contributor

@Sija Sija commented Oct 27, 2022

This one is arguably more subjective, and (given foreknowledge/sensing of what Object#in? does) makes code more terse and natural to read. Followup to #8723.

+ raytracer sample bugfix

@straight-shoota
Copy link
Member

I don't see this as controversive. If we didn't think Object#in? was good to be used, I'd argue we shouldn't have added it in the first place.

@straight-shoota straight-shoota added this to the 1.7.0 milestone Oct 28, 2022
@straight-shoota straight-shoota merged commit 60ca566 into crystal-lang:master Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants