Robert Klemme wrote: > 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 I didn't mean to imply that Ruby needs this. It doesnt. I think that JavaScript is a very fascinating language and I am slowly trying to implement core JavaScript in Ruby, another enjoyable language I am trying to learn. Hence the new operator. Just for the experience.