From: Simon Strandgaard Date: 2004-03-08T07:54:40+09:00 Subject: proposal: class< ruby a.rb hello server> cat a.rb module M def self.extended(parent) parent.init_m end def init_m @str = "hello" end def hello puts @str end end class C end c = C.new c.extend(M) c.hello server> The next part doesn't work.. (thus the proposal) server> cat b.rb class C end c = C.new class << c def self.extended(parent) # proposal: invoke me ;-) parent.init_m end def init_m @str = "hello" end def hello puts @str end end c.hello server> ruby b.rb b.rb:13: warning: instance variable @str not initialized nil server> -- Simon Strandgaard