Skip to content

Commit

Permalink
Disable rule as it's misbehaving
Browse files Browse the repository at this point in the history
```
[1] (main)> [["AA", "a"]].each { |key, value| puts key.to_s }
AA
=> [["AA", "a"]]
[2] (main)> [["AA", "a"]].each_key { |key, value| puts key.to_s }
NoMethodError: undefined method `each_key' for [["AA", "a"]]:Array
from (pry):2:in `__pry__'
[3] (main)> [["AA", "a"]].to_h.each_key { |key, value| puts key.to_s }
AA
=> {"AA"=>"a"}
```
  • Loading branch information
kevinrobayna committed Dec 4, 2023
1 parent d368faa commit d237f8f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

4.4.1
-----
* Disable `HashEachMethods` style for [Style/HashEachMethods](https://docs.rubocop.org/rubocop/cops_style.html#stylehasheachmethods)


4.4.0
-----
* Enforce `always` style for [Style/AndOr](https://docs.rubocop.org/rubocop/cops_style.html#styleandor)
Expand Down
2 changes: 1 addition & 1 deletion gc_ruboconfig.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |spec|
spec.name = 'gc_ruboconfig'
spec.version = '4.4.0'
spec.version = '4.4.1'
spec.summary = "GoCardless's shared Rubocop configuration, conforming to our house style"
spec.authors = %w[GoCardless]
spec.homepage = 'https://github.com/gocardless/ruboconfig'
Expand Down
2 changes: 1 addition & 1 deletion rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ Style/ModuleFunction:
Enabled: false

Style/HashEachMethods:
Enabled: true
Enabled: false

Style/HashTransformKeys:
Enabled: true
Expand Down

0 comments on commit d237f8f

Please sign in to comment.