h = Hash.new(0) # default = 0
=> {}
h['justin'] +=10
=> 10
sweet!
or even better:
@index = Hash.new(Hash.new(0))
@index['justin']['cool'] += 20
attempts to solve technical problems
h = Hash.new(0) # default = 0
=> {}
h['justin'] +=10
=> 10
@index = Hash.new(Hash.new(0))
@index['justin']['cool'] += 20
0 comments:
Post a Comment