On Fri, Mar 5, 2010 at 9:07 PM, Cory Chamblin
<ruby-forum / web.chamblin.info> wrote:
> Jes=FAs Gabriel y Gal=E1n wrote:
>> One liner:
>>
>> mymethod(h =3D {:this =3D> 'green'} && condition ? h.merge({:that =3D>
>> 'blue'}) : h)
>>
>
> You could also do it this way:
>
> method {:Apples =3D> 1}.merge(condition ? {:Oranges =3D> 2} : {})

Oh, good one ! That's much clearer than my one liner. I still prefer
the expanded solution though.

Jesus.