On Tue, Sep 20, 2011 at 03:11:05AM +0900, Aya Abdelsalam wrote:
> Hello
> I want I ask something I am using ruby192 I want to know if it can
> support overloaded constructor

AFAIK it can't.

> for example
> if i want to write this c++ code in ruby
> class CRectangle {
>     int width, height;
>   public:
>     CRectangle (int,int);
>     CRectangle(int);
>     int area () {return (width*height);}
> };
> 
> CRectangle::CRectangle (int a, int b) {
>   width = a;
>   height = b;
> }
> CRectangle::CRectangle (int a) {
>   width = a;
>   height = a;
> }
> What should I do?
> 
> -- 
> Posted via http://www.ruby-forum.com/.
> 

-- 
Darryl L. Pierce <mcpierce / gmail.com>
http://mcpierce.multiply.com/
"What do you care what people think, Mr. Feynman?"