Subject: Re: Constructors
From: Robert Klemme <shortcutter googlemail.com>
Date: Tue, 4 Nov 2008 02:48:43 +0900
References: 319278319284
In-reply-to: 319284
On 03.11.2008 17:11, Stefano Crocco wrote:
> I think the closest you can get to the Java syntax is this:
>
> def new o, *args
> o.class == Class ? o.new(*args) : o
> end
Can someone please explain to me what we gain by doing this?
robert