I would like to know all the differences between Module and Class, except
the ones that occur only in hidden parts of the Ruby interpreter. I mean
everything that is exposed to application programming, including what is
exposed to programming extensions and embedding the ruby interpreter in
other applications. An example of excluded details would be the hidden
proxy classes that handle the use of #include.

Up to now I have found six differences :

1. Class inherits from Module (and obviously not the other way around).

2. Module#include(x) works where x is a Module, _except_ where x is a
Class.

3. class A<x works where x is a Class, not when x is Module.

4. Class#new exists. Module#new doesn't exist. instantiating an Object is
the responsibility of Class#new and Class#allocate, which may decide to
make an Object have a T_DATA cell type (or other) instead of the ordinary
T_OBJECT cell type. This does not involve any non-Class Module, which can
only participate in the #initialize phase.

5. a Class always has Object in its ancestor list, while a non-Class
Module never has.

6. if Class===B and Class===A and B<A, then also
(class<<B;self;end)<(class<<A;self;end). This does not occur if A is a
non-Class Module, nor in any other case.



So, is there anything I may be missing ?

(note: every Class is a Module, because Class<Module, which is why I
talk about "non-Class Modules")



________________________________________________________________
Mathieu Bouchard                       http://artengine.ca/matju