-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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/Sample cop incorrectly reports and auto-corrects var.shuffle.join #1816
Comments
Definitely a bug. |
aaw
added a commit
to aaw/aptible-tasks
that referenced
this issue
Apr 21, 2015
The most recent sweetness build just picked up a bug in the Performance/Sample cop (rubocop/rubocop#1816) from 0.30.1, which fails the sweetness build. Let's pin rubocop to a known good version so that we're not continually picking up new cops and changes from patch versions without explicit updates to aptible-tasks.
//cc @rrosenblum |
Yes, this is a bug. I apologize, I was missing adequate negative test cases during the last change. I think that I can get a fix together quickly. Thank you for submitting the issue. |
rrosenblum
added a commit
to rrosenblum/rubocop
that referenced
this issue
Apr 21, 2015
…all of the elements of the shuffled array
bbatsov
added a commit
that referenced
this issue
Apr 21, 2015
[Fix #1816] Do not register an offense for shuffle when using all of the elements of the shuffled array
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After updating to 0.30.1 we've had the following new offence come up, which I believe is incorrect and causes a change in behaviour when auto-correcting:
Performance/Sample: Use sample instead of shuffle.join
When auto-correcting, this changes
variable.shuffle.join
intovariable.sample
.This behaviour is very different:
The text was updated successfully, but these errors were encountered: