Ryan Davis wrote:
> On Nov 16, 2008, at 23:26 , Zhao Yi wrote:
> 
> short answer: you can't (via normal ruby).
> 
>> When I run this program, I got this error:
>>
>> class_objects/module.rb:22:in `fun': wrong number of arguments (0  
>> for 1)
>> (ArgumentError)
>>  from class_objects/module.rb:22
>>
>> I declared two methods with the same name but different parameters.  
>> Why
>> can't ruby support overload method?
> 
> because it wasn't designed to, that's why.
> 
> You can use default args to do what you want above:

I am new to Ruby. What's do you mean by default args?
thanks
-- 
Posted via http://www.ruby-forum.com/.