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

Tweaks to satisfy RuboCop Performance 1.8.0 #458

Merged
merged 1 commit into from
Sep 4, 2020

Conversation

mlinksva
Copy link
Member

@mlinksva mlinksva commented Sep 4, 2020

https://github.com/rubocop-hq/rubocop-performance/releases/tag/v1.8.0

Performance/CollectionLiteralInLoop caught some instances in tests.
Not all that important, but why not make tests use a tiny bit less
memory...

Note one of the changes, that in spec/integration_spec.rb doesn't
actually allocate less, it just naively satisfies the cop. Actually
moving the declaration outside of the loop would move it way far
from use and be less readable IMO.

https://github.com/rubocop-hq/rubocop-performance/releases/tag/v1.8.0

Performance/CollectionLiteralInLoop caught some instances in tests.
Not all that important, but why not make tests use a tiny bit less
memory...

Note one of the changes, that in spec/integration_spec.rb doesn't
actually allocate less, it just naively satisfies the cop. Actually
moving the declaration outside of the loop would move it way far
from use and be less readable IMO.
@mlinksva mlinksva merged commit 59e71c3 into master Sep 4, 2020
@delete-merged-branch delete-merged-branch bot deleted the CollectionLiteralInLoop branch September 4, 2020 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants