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

Support Range#member? method for Performance/RangeInclude cop #125

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

fatkodima
Copy link
Contributor

# bad
('a'..'z').member?('b')  # => true

# good
('a'..'z').cover?('b') # => true

@koic
Copy link
Member

koic commented Jun 4, 2020

I think it makes sense because Range#member? is the alias for Range#include?. Can you add VersionChanged: 1.7 to config/default.yml of this cop?

@fatkodima fatkodima force-pushed the add-member-to-range_include_cop branch from db1a4bf to 387ad53 Compare June 4, 2020 00:21
@fatkodima
Copy link
Contributor Author

Updated.

@koic koic merged commit f5de08e into rubocop:master Jun 5, 2020
@koic
Copy link
Member

koic commented Jun 5, 2020

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants