"Brad Hilton" <bhilton / vpop.net> wrote in
....
> And by 'fixed' do you mean that adding singleton methods to FalseClass
> objects is allowed? (That would be great.)
>
> Another individual suggested that FalseClass was a singleton class with
> the implication that I shouldn't try to add singleton methods to
> FalseClass objects.  Is that true?

"true" is the only FalseClass instance - so adding a singleton method to true
or adding instance method to FalseClass pretty much amounts to the same
thing. Note that ``true'' has nooooo singleton class but it is still possible to
define a singleton method for true - i.e.

def true.okay;  p "okay" end

works but

class << true; end

raises a TypeError. Afaict all of this is pretty much an artifact of the
implementation - i.e. you probably shouldn't read too much into any of this.

/Christoph

Ps. Occasionally I was graving for something like a (Nil|True|False)Module
scheme - but the performance overhead is likely too great ...