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

Bug in Performance/Size #2331

Closed
JuanitoFatas opened this issue Oct 20, 2015 · 2 comments
Closed

Bug in Performance/Size #2331

JuanitoFatas opened this issue Oct 20, 2015 · 2 comments

Comments

@JuanitoFatas
Copy link
Contributor

Given this code:

def foo
  [1, 2].count(1)
end

When you run rubocop 0.34.2 yields:

C: Performance/Size: Use size instead of count.

When #count has an argument, shouldn't give this advice? Thanks!

@rrosenblum
Copy link
Contributor

You are correct. This is a bug. I will have a fix for it shortly

@JuanitoFatas
Copy link
Contributor Author

Closed. See #2333. Thank you @rrosenblum 👍

rrosenblum added a commit to rrosenblum/rubocop that referenced this issue Oct 23, 2015
bbatsov added a commit that referenced this issue Oct 23, 2015
[Fix #2331] Do not register an offense for count with an argument in Performance/Size
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

2 participants