Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
Get all values as an array : Hash values « Hash « Ruby
Ruby
Hash
Hash values
Get all values as an array
hash = {1 => 2, 2 => 2, 3 => 10} p hash.values # => [2, 2, 10]
Related examples in the same category
1.
Get an array with all the values from a hash with values:
2.
what is the default value for a hash