From: Robert Klemme Date: 2007-01-26T02:01:55+09:00 Subject: Re: Class.new ? 2007/1/25, Avdi Grimm : > The first example off the top of my head: > > A class which might return an existing object out of an object pool, > instead of returning a new object. > > But there are plenty of other possibilities. Singletons for example. irb(main):001:0> require 'singleton' => true irb(main):002:0> class Foo irb(main):003:1> include Singleton irb(main):004:1> end => Foo irb(main):005:0> Foo.new NoMethodError: private method `new' called for Foo:Class from (irb):5 from :0 irb(main):006:0> Foo.instance => # irb(main):007:0> Foo.instance => # irb(main):008:0> Foo.instance => # irb(main):009:0> Kind regards robert PS: The gateway seems to have trouble again - I see only some of the postings in this thread on the news side...