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 enumerable_method? for MethodIdentifierPredicates #37

Merged
merged 1 commit into from
Jun 14, 2020

Conversation

fatkodima
Copy link
Contributor

@marcandre marcandre merged commit 8b95869 into rubocop:master Jun 14, 2020
@marcandre
Copy link
Contributor

Good work. Another good example for #29 to avoid 61 loops all the time.

@@ -12,6 +12,8 @@ module MethodIdentifierPredicates
map reduce reject reject! reverse_each select
select! times upto].freeze

ENUMERABLE_METHODS = (Enumerable.instance_methods + [:each]).freeze
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a small chance this might cause an issue due to a mismatch between Ruby version RuboCop is run with versus the version of the code inspected, but I think it's a small enough concern that this is still okay.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point. Might be best to list them explicitly.

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.

3 participants