Mega Code Archive
Categories
/
Ruby
/
Hash
Get all keys from a hash
hash = {1 => 2, 2 => 2, 3 => 10} p hash.keys # => [1, 2, 3]