From: Leslie Viljoen Date: 2008-02-20T07:11:31+09:00 Subject: ||= [] idiom I often make use of this idiom to add something to an array in a hash of arrays: @categories = {} pagelist.each do |resource| @categories[resource.tag] ||= [] @categories[resource.tag] << resource end .. is there a better way? Can the two @categories lines be made into one? Les