From: Robert Dober Date: 2008-01-31T07:42:34+09:00 Subject: Re: counting the number of repititions in an array A small 1.9 solution p 100.times. map{rand(5)}. inject(Hash.new(0)){|h,e| h.update e => h[e].succ} Robert