Hello all,

As you know, if you mix-in Singleton module in a class,
#new is made private, and only one instance of the class
may be created via #instance method - the first time it
is called, #new is called from within a class, all following
calls of #instance will return the already created object.

What is peculiar is that you cannot pass any arguments
to the constructor when creating the object, that is, you 
cannot do

    a = SomeClass.instance(1,2,3)

But it is trivial to enable it, here is the diff of singleton.rb:

18c18
<       def instance
---
>       def instance(*args)
22c22
< 	    @__instance__ ||= new
---
> 	    @__instance__ ||= new(*args)

Naturally, all non-first arguments of #instance will be ignored.

Happy Rubying,
Yuri Leikind