Rubyæåã¯ã¤ãº(5)
(1)
module A def a 42 end end module B include A end class C include B end p C.new.a
(2)
module A def a 42 end end module B end class C include B end module B include A end p C.new.a
(1)
42
(2)
undefined method `a' for #<C:0x0a8ccc> (NoMethodError)
å¾ããç¶æ¿é¢ä¿ã追å ãã¦ãï¼ãµãã¯ã©ã¹ã«ã¯åæ ãããªãï¼ã©ããªãã ãã®æåâ¦