From: Sean O'Dell Date: 2002-03-13T10:39:00+09:00 Subject: Module Syntax Being primarily a C++ programmer, I'm happy with Ruby's Module concept because it's pretty close to what I have with C++ namespaces, which I use a lot (everything gets wrapped up in a namespace somewhere). However, I'm puzzled by some syntax I discovered by accident and I was wondering if anyone could tell me what this is. It was becoming tedious indenting everything like this: module MyModule def MyFunction mycode() end end ....so just for the heck of it, I wrote this: def MyModule::MyFunction mycode() end ....and it worked! But...for all the reading I've done, I don't recall reading anything like this. Why does this work and what is it doing? Has it attached itself to the Module "MyModule?" Sean