Software Development
Pages
Home
About
Contact
Wednesday, June 24, 2015
How to provide a default value for all elements in a hash
a = Hash.new(0)
=> {}
> a['x']
=> 0
Newer Post
Older Post
Home