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

Performance/Size false positive: Array#count with Symbol#to_proc block #1935

Closed
m1foley opened this issue Jun 2, 2015 · 0 comments · Fixed by #1936
Closed

Performance/Size false positive: Array#count with Symbol#to_proc block #1935

m1foley opened this issue Jun 2, 2015 · 0 comments · Fixed by #1936

Comments

@m1foley
Copy link

m1foley commented Jun 2, 2015

Passes: [1, 2, 3].count { |x| x.even? }
Fails: [1, 2, 3].count(&:even?)

m1foley pushed a commit to m1foley/rubocop that referenced this issue Jun 3, 2015
This check should pass when passing a block to #count, but
Symbol#to_proc blocks were not being allowed like they should.
m1foley pushed a commit to m1foley/rubocop that referenced this issue Jun 3, 2015
This check should pass when passing a block to #count, but
Symbol#to_proc blocks were not being allowed like they should.
m1foley pushed a commit to m1foley/rubocop that referenced this issue Jun 3, 2015
This check should pass when passing a block to #count, but
Symbol#to_proc blocks were not being allowed like they should.
m1foley pushed a commit to m1foley/rubocop that referenced this issue Jun 4, 2015
This check should pass when passing a block to #count, but
Symbol#to_proc blocks were not being allowed like they should.
m1foley pushed a commit to m1foley/rubocop that referenced this issue Jun 5, 2015
This check should pass when passing a block to #count, but
Symbol#to_proc blocks were not being allowed like they should.
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 a pull request may close this issue.

1 participant