From: bob_sidebotham@... (Bob Sidebotham) Date: 2002-03-13T17:39:42+09:00 Subject: Re: Module Syntax "Sean O'Dell" wrote in message news:<2Wxj8.9596$Tn4.2215052406@newssvr14.news.prodigy.com>... > ...so just for the heck of it, I wrote this: > > def MyModule::MyFunction > mycode() > end > > ...and it worked! And I did: module A def A.a end end and was surprised to discover that I could call a as either A::a OR A.a Is this intentional? On another note, the way the Pick Axe book describes Modules, it would seem that only methods and constants can be placed in a Module. In fact, it seems to be possible to put classes and plain old executable code in modules as well, and I find myself quite confused as to the rules. I'd like modules (when not used for mixins) to look just exactly like simple namespaces, but I'm not sure they are exactly the same as what I think that means... (in particular, having to precede a module method's name by the module name, seems to make things not quite transparent). Is it just me that's confused, or would it be better/clearer if a module and a mixin were really two separate concepts, perhaps with two separate names? Bob Sidebotham