We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In rubocop 1.58.0 this code triggers Style/HashEachMethods.
arry = [[1, 2], [3, 4] arry.each { |_x, y| puts y }
If you correct it you get the error:
undefined method `each_value' for [[1, 2], [3, 4]]:Array (NoMethodError)
Clearly de-structuring in a block is not sufficient evidence to determine the callee is a Hash.
The text was updated successfully, but these errors were encountered:
This issue is a dup with #12444.
Sorry, something went wrong.
And, RuboCop cannot determine the type of the receiver, this cop has already been marked as unsafe: https://docs.rubocop.org/rubocop/1.58/cops_style.html#stylehasheachmethods
Moreoverer, you can address this issue with the following configuration:
# .rubocop.yml Style/HashEachMethods: AllowedReceivers: ['arry']
No branches or pull requests
In rubocop 1.58.0 this code triggers Style/HashEachMethods.
If you correct it you get the error:
Clearly de-structuring in a block is not sufficient evidence to determine the callee is a Hash.
The text was updated successfully, but these errors were encountered: