Jesús Gabriel y Galán wrote:
> One liner:
> 
> mymethod(h = {:this => 'green'} && condition ? h.merge({:that => 
> 'blue'}) : h)
> 

You could also do it this way:

method {:Apples => 1}.merge(condition ? {:Oranges => 2} : {})
-- 
Posted via http://www.ruby-forum.com/.