gz zz wrote:
> d=["a", "a", "a", "b", "b", "c", "c", "c","d", "d", "e"]
> p d
> 
> dd={}
> d.each do |v|
>  dd[v]||=0
>  dd[v]+=1
> end
> 
> p dd
> 
> p dd.values

But,I think ruby's Hash is not ordered,so...

-- 
Posted via http://www.ruby-forum.com/.