How should I use each_with_object on Hashes? Use (): hash.each_with_object([]) { |(k, v), array| array << k }