You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
… of `merge`
Resolvesrubocop#12257.
This PR makes `Style/RedundantDoubleSplatHashBraces` aware of `merge` methods.
Instead of introducing a new cop, this `Style/RedundantDoubleSplatHashBraces` cop can be extended.
…rge`
Resolves#12257.
This PR makes `Style/RedundantDoubleSplatHashBraces` aware of `merge` methods.
Instead of introducing a new cop, this `Style/RedundantDoubleSplatHashBraces` cop can be extended.
koic
added a commit
to koic/rubocop
that referenced
this issue
Oct 11, 2023
… of `merge`
Resolvesrubocop#12257.
This PR makes `Style/RedundantDoubleSplatHashBraces` aware of `merge` methods.
Instead of introducing a new cop, this `Style/RedundantDoubleSplatHashBraces` cop can be extended.
Just found an example code from rails that can be improved https://github.com/rails/rails/blob/8ab5e58272b1da9548bb607542525002b44799ed/activesupport/lib/active_support/number_helper/number_converter.rb#L166-L172
Duplicating first method here
There is unnecessary
merge!
and hash splat. Can be also written as:I have also seen such examples before in the wild, so this is quite a popular pattern.
The text was updated successfully, but these errors were encountered: