Mega Code Archive
Categories
/
Ruby
/
Hash
Get all values as an array
hash = {1 => 2, 2 => 2, 3 => 10} p hash.values # => [2, 2, 10]