I think the problem here may be how "include" works. 

In this example, at runtime, A.constants   => ['CC', 'AA']

In module B, AA is accessible but CC is not.   

"include", which appends features at
runtime, is expected (from me) to make the included module function
and constants  a part of the calling module, that is, at runtime, 
a copy and paste operation. What would you see as advantage for 
the current "include" behavior over the above said one.

Thanks

-Ted


> 
> I don't think so.  It makes constants globally scoped (well, mostly).
> Those rules provide you the "illusion" of statically scoped constants.
> 
>   module C
>     CC = 1
>   end
> 
>   module A
>     include C
>     puts CC     # accessible because A includes C
>     AA = 2
>     module B
>       puts AA   # accessible because B in the scope AA is defined
>       puts CC   # no CC in ancestors, nor outer scope
>     end
>   end
> 
> For most of the cases, static scope is better than dynamic scope.
> 
> 							matz.
> p.s.
> For most of the cases, dynamic typing is better than static typing.>