From: Daniel Schierbeck Date: 2006-06-12T05:14:20+09:00 Subject: Re: Why the lack of mixing-in support for Class methods? Gregory Seidman wrote: > ... if you don't call class_methods before > you first include the module (e.g. you want to reopen the module later to > add class methods), the included method will fail since @class_methods is > nil. Wouldn't this fix it? class Module def class_methods(&block) @class_methods ||= Module.new @class_methods.module_eval(&block) end def included(mod) mod.extend(@class_methods ||= Module.new) end end I'm not saying this implementation is perfect; I only wrote it for this thread. Daniel