On Fri, Oct 14, 2011 at 15:29, Bartosz Dziewoski <matma.rex / gmail.com> wrote:
> You can use this syntax, too. "args" becomes an array of all arguments given.
>
> def foo *args
>  if args.length==0
>   puts 'no argument was given'
>  else
>   puts args[0]
>  end
> end
>
> If you only allow one argument, you should do some checking whether
> there are too many.

Your suggestion is valid. though it seems I underspecified my question
in yet another way.  Until Ruby gets a rb_scan_args equivalent, I°«d
rather not complicate my argument processing unnecessarily by
destructuring an argument array by hand.