On 3/5/2010 2:36 PM, Nick Brown wrote: >>>> mymethod(h = {:this => 'green'} && condition ? h.merge({:that => >>>> 'blue'}) : h) >>>> >>> You could also do it this way: >>> >>> method {:Apples => 1}.merge(condition ? {:Oranges => 2} : {}) >>> > > For the love of all that is good and holy, please do not try to cram two > elegant lines of code into one disgusting line. That way lies madness... > > ;-) > It's called Perl golf. It amazes and terrifies me how much it is still played.