From: MenTaLguY Date: 2008-02-20T07:26:10+09:00 Subject: Re: ||= [] idiom On Wed, 20 Feb 2008 07:15:52 +0900, Sebastian Hungerecker wrote: >> .. is there a better way? > > @categories = Hash.new {Array.new} > pagelist.each do |resource| > @categories[resource.tag] << resource > end Although it is specific to hashes, when this is applicable I do think it can be a better approach than the more general approach I outlined in my other email. -mental