From: Andrew Johnson Date: 2004-03-30T17:09:26+09:00 Subject: Re: Surprise with Hash#new On Tue, 30 Mar 2004 07:28:40 +0000 (UTC), Luis D Casillas wrote: > PS I ended up not needing that data structure, but after seeing my > mistake I managed to get the behavior I wanted this way: Alternatively, Hash.new can take a block to generate default values: @seen = Hash.new {|h,k| h[k] = []} regards, andrew