module C def initialize print :C super end end module B def self.included(base) base.send :include, C end def initialize print :B super end end class A include B def initialize print :A super end end A.new åï¼ åï¼ã«ãããç¶æ ããæå°ã®æ¹å¤ã§åºåãCABã¨ããããã©ãããã°ãããã âçãâ åï¼ æ£è§£ï¼ A è§£èª¬ï¼ åæ¹ã®ã¡ã½ãããå¾æ¹ã®ã¡ã½ããã§ä¸æ¸ããããããã åï¼ æ£è§£ï¼ AB è§£èª¬ï¼ `include B`ã«ããç¶æ¿é ä½ã`A -> B`ã¨ãªããA#initializeã«ãããsuperã§B#initializeãå¼ã°ãããããç¶æ¿é ä½ã¯A.ancestorsã§ç¢ºèªã§ãã¾ã
{{#tags}}- {{label}}
{{/tags}}