On Oct 14, 12:11  
> On Fri, Oct 14, 2011 at 17:31, Jens Wille <jens.wi... / uni-koeln.de> wrote:
> > class A
>
> >       > >  > >   
> >  > >  > >  
> >  
>
> > end
>
> > can't remember where i first saw it, but it works perfectly ;)
>
> Yes, of course!   the trick I saw too; checking if the optional
> argument default value was evaluated.
>
> Here a more general solution that allows you to set d to a value
> independent of the desired default value for the argument:
>
> def m(a = (d = true; nil))
> # d will be true if argument a wasn specified
> end
>
> One easily forgets how expressive Ruby can be. r how easily it is to abuse it.
>
> Thanks!

Well shit, that might be my new favorite too.

  def m(a=(na=true))
    p a, na
  end

  > m
  true
  true

  > m('foo')
  "foo"
  nil

So, is there a downside to this?