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
Fixesrubocop#12263.
This PR fixes false positives for `Style/RedundantDoubleSplatHashBraces`
when method call for no hash braced double splat receiver.
The code shown in rubocop#12263 is incompatible as shown below and is a false positive:
```ruby
def x(opts) = puts(opts)
h = {foo: :bar}
x(**h.merge(k: :h)) #=> {:foo=>:bar, :k=>:h}
x(k: :v, **h) #=> {:k=>:v, :foo=>:bar}
```
Fixes#12263.
This PR fixes false positives for `Style/RedundantDoubleSplatHashBraces`
when method call for no hash braced double splat receiver.
The code shown in #12263 is incompatible as shown below and is a false positive:
```ruby
def x(opts) = puts(opts)
h = {foo: :bar}
x(**h.merge(k: :h)) #=> {:foo=>:bar, :k=>:h}
x(k: :v, **h) #=> {:k=>:v, :foo=>:bar}
```
I updated to 1.57.0, and in my code I see new Style/RedundantDoubleSplatHashBraces offence, on the line:
Expected behavior
I expect something like
Actual behavior
I got
And it doesn't even look like correct ruby expression.
Steps to reproduce the problem
just run
rubocop -a
on above codeRuboCop version
The text was updated successfully, but these errors were encountered: