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

Prefer include? over member?? #804

Closed
dmolesUC opened this issue Mar 9, 2020 · 5 comments
Closed

Prefer include? over member?? #804

dmolesUC opened this issue Mar 9, 2020 · 5 comments

Comments

@dmolesUC
Copy link

dmolesUC commented Mar 9, 2020

In the spirit of

Prefer map over collect, find over detect, select over find_all, reduce over inject and size over length.

it would be nice to specify (and have a cop to enforce) these.

(And there might be other Enumerable synonym methods I'm not thinking of; I only noticed these because I ran across an old codebase that uses member?.)

@bbatsov
Copy link
Collaborator

bbatsov commented Mar 10, 2020

That sounds reasonable to me. PR welcome. :-)

@dmolesUC
Copy link
Author

Done. I have a RuboCop fork with the corresponding cop updates; should I file an issue there first or just file a pull request?

@bbatsov
Copy link
Collaborator

bbatsov commented Mar 11, 2020

Just file a PR.

@dmolesUC
Copy link
Author

Done: rubocop#7793. Thanks!

@koic
Copy link
Member

koic commented Mar 12, 2020

This issue has been resolved by #805.

@koic koic closed this as completed Mar 12, 2020
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

No branches or pull requests

3 participants