From: Robert Dober Date: 2006-10-10T23:23:19+09:00 Subject: Re: *args to Hash ------=_Part_10382_21649906.1160490197554 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 10/10/06, Trans wrote: > > > Trans wrote: > > def foo(*args) > > h =3D (Hash =3D=3D=3D args.last ? args.pop : {}) > > args.each{|m| h[m]=3Dm} > > args =3D h > > #.... > > end > > > > T. > > GOLF. > > T. "args.last ?".sub(/.l..../, "[-1]") =3D=3D> -2 Most other WS can go away anyway so I guess you put them for Readability, like "You know that cut I could have made it, but I wanted to make a three put o= n the last green for more readability ;)" R. --=20 Deux choses sont infinies : l'univers et la b=EAtise humaine ; en ce qui concerne l'univers, je n'en ai pas acquis la certitude absolue. - Albert Einstein ------=_Part_10382_21649906.1160490197554--