Fixes #37287 - Iterate on hashes when both key and value are used
This replaces the `hash.keys.each { |k| hash[k] }` and `hash.keys.sort` patterns with `hash.each { |k, v| }` where it makes sense. This avoids doing hash lookups when you already know the value anyway.
Related issues
Refactor #37287: Iterate on hashes when both key and value are used
Fixes #37287 - Iterate on hashes when both key and value are used
This replaces the `hash.keys.each { |k| hash[k] }` and `hash.keys.sort`
patterns with `hash.each { |k, v| }` where it makes sense. This avoids
doing hash lookups when you already know the value anyway.