On Thu, 7 Dec 2006, Ken Bloom wrote:

> Try this-- it's more concise, and you probably won't feel the need
> for more syntactic magic after that.
>
> def test(args)
>  args[:a] ||= 'defaultA'
>  args[:b] ||= 'defaultB'
>  args[:c] ||= 'defaultC'
>  puts args.indexes(:a, :b, :c)
> end


but this breaks

   test :a => false

as does this

   test :a => nil

and this

   test 'a' => true

regards.

-a
-- 
if you want others to be happy, practice compassion.
if you want to be happy, practice compassion.  -- the dalai lama