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

[Fix #7831] Fix a false positive for Style/HashEachMethods #7832

Merged

Commits on Mar 31, 2020

  1. [Fix rubocop#7831] Fix a false positive for Style/HashEachMethods

    Fixes rubocop#7831.
    
    This PR fix a false positive for `Style/HashEachMethods` when there is no
    receiver for `keys` and `values`.
    
    The following is an examples.
    
    ```ruby
    values.each { |k, v| do_something(k, v) }
    keys.each { |k, v| do_something(k, v) }
    ```
    
    False negatives occur in cases such as object that inherit Hash,
    but that is perhaps a corner case.
    I think it is more worthwhile to resolve the false positives with
    common naming of `values`.
    koic committed Mar 31, 2020
    Configuration menu
    Copy the full SHA
    3d63c6d View commit details
    Browse the repository at this point in the history