"Ilmari Heikkinen" <kig / misfiring.net> schrieb im Newsbeitrag
news:39518454-662A-11D9-AB45-000A95CD3934 / misfiring.net...
> Hi,
>
> On 14.1.2005, at 12:16, Robert Klemme wrote:
> > def silly_example(str.to_str, count.to_int)
> >   # str and count are converted like in the example above
> >   s = ""
> >   count.times { s << str }
> >   s
> > end
>
> Not to argue against possible syntatic sugar, but you can already do
> this in the method signature:
>
> def silly_example(ostr, ocount, str=ostr.to_str, count=ocount.to_int)

Yeah, I know, but that's quite inconvenient IMHO.  Also you need to
duplicate the number of your parameters plus it won't work with varying
lenght argument lists.

Regards

    robert