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

Disable rule as it's misbehaving #119

Merged
merged 1 commit into from
Dec 4, 2023
Merged

Disable rule as it's misbehaving #119

merged 1 commit into from
Dec 4, 2023

Conversation

kevinrobayna
Copy link
Contributor

[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"}

```
[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"}
```
@kevinrobayna kevinrobayna merged commit e9b92de into master Dec 4, 2023
4 checks passed
@kevinrobayna kevinrobayna deleted the disable_hash branch December 4, 2023 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants