On Feb 23, 2010, at 2:19 AM, Haase, Konstantin wrote:

> On Feb 23, 2010, at 08:46 , Kornelius Kalnbach wrote:
> 
>>> Then, the next issue is whether Kernel#singleton_class should create
>>> an eigenclass when the receiver has no eigenclass.  It would be better
>>> to have an optional argument (singleton_class(true/false) or
>>> singleton_class(:create => true)?) to switch the behavior.
>> I always perceived singleton classes to be transparently created in the
>> background. Would it be wise to give the programmer access to its
>> existence status? (I assume singleton_class(false) == nil would behave
>> like a singleton_class? method.) Today, Ruby has no way of telling
>> whether an object already has a singleton class, or am I wrong?
>> 
>> Also, why would I ask for a singleton_class without using it?
>> 
> 
> Agreed. I always assumed that not having a singleton class object for every object was an implementation detail.

Yeah, I agree.