Martin DeMello wrote:
> "jonathan <zjll9 / imail.etsu.edu> <zjll9 / imail.etsu.edu> <zjll9 / imail.etsu.edu>" <zjll9 / imail.etsu.edu> wrote:
> >
> > Hmm.. Ok.  But, with Ruby, you can still dynamically create subclasses
> > that aren't singletons and extend them as well as instanciate instances
> > of them, right?  That would provide the flexibility I was referring to
> > above, but I suppose it would require typing quite a few more
> > characters.  So do I understand correctly that Matz designed the whole
> > singleton creation mechanism ( << ) as a shorthand for doing more
> > long-winded dynamic creation/enhancing?
>
> It's not a subclass, it's an anonymous proxy superclass. It goes into
> the inheritance chain between the object it extends and the class that
> object derived from, like so (assume a is a String):
>
> [String] --- [class << a] --- [a]
>
> Since ruby doesn't have multiple inheritance, you can see why there can
> (and need!) only be a single proxy superclass.
>
> martin

How about this old chestnut, which I frankly don't understand:

http://onestepback.org/images/rubyobjects.png