From: Trans Date: 2009-08-20T00:23:14+09:00 Subject: Re: #has_arguments? On Aug 19, 7:53 am, Roger Pack wrote: > >  def meth(*a) > >    if !a.empty? > >      a = a.first > >       ... > >    else > >      ... > >    end > >  end > > Maybe morph this to > > def meth(*a) >   if has_arguments? a >     ... >   else >     ... >   end > end Either way is fine. The defined method interface doesn't matter. #has_arguments? would simply report false if a call to the method passed no arguments. If the interface definition itself does not allow for no arguments, eg. 'def meth(a)', then #has_arguments? would simply never return false. T.