-
-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
Is your feature request related to a problem? Please describe.
The suggestion for casecmp
can be updated to use the newer Ruby 2.4 method casecmp?
instead of casecmp.zero?
which requires the user to know the contract for the casecmp
method. The ?
variation returns truthy or falsy values and is more succinct.
Example:
str.casecmp('ABC').zero?
vs. str.casecmp?('ABC')
Describe the solution you'd like
Would it be possible to include casecmp?
as a potential Good
alternative in the casecmp cop?
Describe alternatives you've considered
Removing the .zero?
variation completely might not be preferable if we are supporting versions of Ruby before 2.4.
Additional context
N/A
Metadata
Metadata
Assignees
Labels
No labels