From: Jeff Wood Date: 2005-11-23T10:51:19+09:00 Subject: Re: what is the ruby way to do this? ------=_Part_998_18097895.1132710674199 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline ok ... a =3D Hash.new ->{ [] } # new syntax ;) ... On 11/22/05, 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 =3D 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. > > -a > -- > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > | ara [dot] t [dot] howard [at] gmail [dot] com > | all happiness comes from the desire for others to be happy. all misery > | comes from the desire for oneself to be happy. > | -- bodhicaryavatara > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood ------=_Part_998_18097895.1132710674199--