From: Leonid Razoumov Date: 2001-05-08T07:41:25+09:00 Subject: [ruby-talk:14825] [Q] Why module methods are NOT included by 'include' statement? Ruby has a powerful 'include some_module' statement which imports into the current namespace constants, class variables and instance methods defined in some_module. However, module methods are NOT imported. Why so? #EXAMPLE module Mod MY_C = 12345.54321 # module constant def inst_func() # instance function puts "I am an instance function in module Mod" end def Mod.mod_func() # module function puts "I am a module function in module Mod" end end class Cls include Mod end Cls::MY_C # -> 12345.54321 Cls.new.inst_func # -> "I am an instance function in module Mod" Cls.mod_func # -> NameError: undefined method `mod_func' for Cls:Class By the way, when a class gets inherited, its class methods become class methods of the derived class. Why the module methods are treated differently? Thanks, Leo [ slonika AT yahoo DOT com ]