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

Add support for != operator in Crystal version #519

Closed
syeopite opened this issue Aug 12, 2021 · 2 comments · Fixed by #520
Closed

Add support for != operator in Crystal version #519

syeopite opened this issue Aug 12, 2021 · 2 comments · Fixed by #520

Comments

@syeopite
Copy link
Contributor

Sometimes upstream Crystal bugs can introduce backward incompatible changes. IE crystal-lang/crystal#10972. It may be useful to have support for a != operator to negate specific versions of crystal.

@beta-ziliani
Copy link
Member

@syeopite I think it would make sense to consider "!= 1.0" as "1.0 and any of its patches". WDYT? I didn't see this case tested, that's why I ask.

@syeopite
Copy link
Contributor Author

That seems a bit counterintuitive to me. I'd personally expect a != to work exactly like == but opposite, so having it negate patches as well is rather confusing. A separate !~ operator to handle that behavior might be better in this case.

Also, I originally proposed this due to the upstream bug introduced in crystal-lang/crystal#10583, which was fixed in Crystal version 1.1.1. So changing the behavior of != to also negate patches would be counterproductive to that to that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants