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/RedundantMerge Auto-Correction Issue #2570

Closed
basex opened this issue Jan 2, 2016 · 4 comments
Closed

Performance/RedundantMerge Auto-Correction Issue #2570

basex opened this issue Jan 2, 2016 · 4 comments

Comments

@basex
Copy link

basex commented Jan 2, 2016

Was running the last version of the rubocop code with ruby 2.3.0 and got the following auto-correction:

-      event.merge!('$first_name' => sba.name, '$last_name' => sba.surname) if store && sba
+      event['$first_name'] = sba.name
+      event['$last_name'] = sba.surname if store && sba

The if should go around both lines, instead of only the last one.

@alexdowad
Copy link
Contributor

Nice catch!

@alexdowad
Copy link
Contributor

I have a fix for this. Waiting for my open PR to be merged before I open another.

@basex
Copy link
Author

basex commented Jan 2, 2016

If there is a fix that is going to be merged for me the issue can be closed.
Thanks in advance :)

@alexdowad
Copy link
Contributor

It will be closed soon. 😄

@bbatsov bbatsov closed this as completed in 1a0a76d Jan 5, 2016
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