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

[Fix #1816] Do not register an offense for shuffle when using all of the elements of the shuffled array #1817

Merged
merged 1 commit into from
Apr 21, 2015

Conversation

rrosenblum
Copy link
Contributor

This fixes #1816. I was missing some important negative test cases when I implemented the fix for shuffle[0, 3]. This lead to the code moving away from only checking for usages of shuffle.first, shuffle.last, and shuffle[]. I have added in some negative tests and added back in the checks for calls to .first, .last, and [].

bbatsov added a commit that referenced this pull request Apr 21, 2015
[Fix #1816] Do not register an offense for shuffle when using all of the elements of the shuffled array
@bbatsov bbatsov merged commit d9348b2 into rubocop:master Apr 21, 2015
@rrosenblum rrosenblum deleted the sample branch April 28, 2015 17:21
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.

Performance/Sample cop incorrectly reports and auto-corrects var.shuffle.join
2 participants