On Thursday 10 December 2009 05:26:03 pm Matt Bleh wrote: > It would be cool to have something like "private" for modules, so that > modules defined after that keyword would only be accesible from the > parent module. Hmm... I'm not sure that's a good idea. Besides, the anonymous module seems like overkill. Maybe people will like your Vector class? There's really nothing stopping you from doing it like this: module A module Private class Vector end def foo Private::Vector.new end end Keep in mind that if anyone actually needs to get at the original Ruby classes, they can always access ::Vector, or worst case, they can do something like: original_vector = Vector require 'evilcode' # or is it an include? Vector = original_vector