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

Hash#merge! is disallowed but Hash#update is allowed #2674

Closed
bquorning opened this issue Jan 19, 2016 · 3 comments
Closed

Hash#merge! is disallowed but Hash#update is allowed #2674

bquorning opened this issue Jan 19, 2016 · 3 comments

Comments

@bquorning
Copy link
Contributor

I’m wondering if it’s an oversight that RedundantMerge disallows the Hash#merge! method but allows its alias Hash#update?

cc @alexdowad

@alexdowad
Copy link
Contributor

I’m wondering if it’s an oversight that RedundantMerge disallows the Hash#merge! method but allows its alias Hash#update?

It sure is! Thanks for the good catch!

@Drenmi
Copy link
Collaborator

Drenmi commented Jan 31, 2016

I added a PR for this, but I can imagine it will cause quite a lot of false positives for Rails users, since #update is also used in ActiveRecord.

@alexdowad
Copy link
Contributor

I added a PR for this, but I can imagine it will cause quite a lot of false positives for Rails users, since #update is also used in ActiveRecord.

Oooh... good point. Actually, the word update is generic enough that it could be used in any number of places.

What to do...

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

3 participants