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
ruby_install.rb:128:5: C: [Correctable] Style/HashEachMethods: Use each_value instead of each and remove the unused _ block argument.
news_history.chunk { |f| f[/(?<=NEWS-)./] }.each do |_, list| ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Steps to reproduce the problem
news_history.chunk { |f| f[/(?<=NEWS-)./] }.each do |_, list|
end
chunk does not return a Hash:
Each element in the returned enumerator is a 2-element array
Fixesrubocop#12761.
This PR fixes a false positive for `Style/HashEachMethods`
when the key block argument of `Enumerable#each` method is unused after `chunk`.
Fixes#12761.
This PR fixes a false positive for `Style/HashEachMethods`
when the key block argument of `Enumerable#each` method is unused after `chunk`.
Expected behavior
No offense.
Actual behavior
Steps to reproduce the problem
chunk
does not return a Hash:RuboCop version
The text was updated successfully, but these errors were encountered: