Hal Fulton wrote:
> trans. (T. Onoma) wrote:
> 
>>>
>>> I really think it's just a class. It has special uses, perhaps, but I 
>>> don't
>>> think it's treated specially. I can't see that it's anything other 
>>> than a
>>> real Class.
>>
>>
>> Except that it is tied to the object and not the class hierarchy. So 
>> it is 'virtually' a class, but not quite ;)
>>
> 
> You can't create an instance of it, and you can't subclass it.
> Those are the only differences I'm aware of with other classes.
> 
> The class Class can't be subclassed either. Is Class not a real class?
> It is. It's just a special case.

Sounds sort of like a traits[1] or what Perl 6 refers to as roles[2][3]. 
But, then this is deeper Ruby than I'm familiar with.

Randy.


1. <http://www.cse.ogi.edu/~black/publications/TR_CSE_02-012.pdf>
2. <http://dev.perl.org/perl6/apocalypse/A12.html>
3. <http://search.cpan.org/~lpalmer/Class-Role-0.03/Role.pm>