From: James Britt Date: 2005-11-23T10:58:02+09:00 Subject: Re: what is the ruby way to do this? Ara.T.Howard wrote: > On Wed, 23 Nov 2005, David A. Black wrote: > >> Hi -- >> >> On Wed, 23 Nov 2005, Jeff Wood wrote: >> >>> I would do >>> >>> a = Hash.new { || [] } >> >> >> I believe that's the first empty || I've ever seen. It's awfully >> confusing (my first reaction was: *what* or an empty array? :-) I'd >> strongly encourage you to eschew that construct. It's deservedly >> unheard of :-) > > > i must confess i love it! probably won't use it much. but i love it. I love it too, and will use it simply because David said he'd never seen it before. James -- http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools