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

Don't consider <=> a comparison method #4615

Merged
merged 1 commit into from
Aug 24, 2017

Commits on Aug 24, 2017

  1. Don't consider <=> a comparison method 🚀 [Fix rubocop#4603]

    I believe, the `<=>` operator should not be considered as a
    `.comparison_method?`.
    
    The main reason is, that this method in difference to all other
    comparison methods doesn't return a boolean, but `-1`, `0` or `1`.
    Thus, many assumptions for comparison methods don't apply, for example,
    there isn't an inverse comparison method (like `<` is the inverse of
    `>=)`, `* -1` isn't a comparison).
    
    This is an alternative to rubocop#4603 by me.
    iGEL committed Aug 24, 2017
    Configuration menu
    Copy the full SHA
    5390f4e View commit details
    Browse the repository at this point in the history