Actions
Patch #29305
closedUse Hash#each_key instead of Hash#keys.each
Description
Hash#each_key
is faster than Hash#keys.each
because it does not allocate a new array when iterating keys. See https://github.com/JuanitoFatas/fast-ruby#hasheach_key-instead-of-hashkeyseach-code for details.
Files
Actions