[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

methods with different arg number

Raphael Bauduin

10/21/2003 8:41:00 AM

Hi,

As a new Rubyist, I was wondering the same as in a post of 2001 I just
pasted here below:

> > is it possible to define Ruby methods with the same names but
> > different
> > number of arguments (overload concept in other languages) ?

The answer was no, but I wonder if that changed since then (I didn't
find a more recent post about this question).

Thanks.

Raph

2 Answers

Robert Klemme

10/21/2003 10:20:00 AM

0


"Raphael Bauduin" <raphael.bauduin@be.easynet.net> schrieb im Newsbeitrag
news:3f94f112$0$1113$6c56d894@feed0.news.be.easynet.net...
> Hi,
>
> As a new Rubyist, I was wondering the same as in a post of 2001 I just
> pasted here below:
>
> > > is it possible to define Ruby methods with the same names but
> > > different
> > > number of arguments (overload concept in other languages) ?
>
> The answer was no, but I wonder if that changed since then (I didn't
> find a more recent post about this question).

No change, this is still current:
http://www.rubygarden.org/ruby?MethodO...

Cheers

robert

Raphael Bauduin

10/21/2003 11:43:00 AM

0

Robert Klemme wrote:
> "Raphael Bauduin" <raphael.bauduin@be.easynet.net> schrieb im Newsbeitrag
> news:3f94f112$0$1113$6c56d894@feed0.news.be.easynet.net...
>
>>Hi,
>>
>>As a new Rubyist, I was wondering the same as in a post of 2001 I just
>>pasted here below:
>>
>> > > is it possible to define Ruby methods with the same names but
>> > > different
>> > > number of arguments (overload concept in other languages) ?
>>
>>The answer was no, but I wonder if that changed since then (I didn't
>>find a more recent post about this question).
>
>
> No change, this is still current:
> http://www.rubygarden.org/ruby?MethodO...
>
> Cheers
>
> robert
>

Thanks, the thread is interesting indeed (I hadn't read it completely,
not being sure it was still applicable).

Raph