From: Elias Athanasopoulos Date: 2004-07-15T03:54:07+09:00 Subject: Re: 'Initializing' modules Hello! On Wed, Jul 14, 2004 at 09:02:21PM +0900, George Moschovitis wrote: > Another surpising thing: > > include A, B seems to include the Modules in the reverse order > include A; include B works as expected. Since nobody replied and I think it's an interesting question, does anyone know why this happens? elathan@velka:~> cat gm.rb module A attr_accessor :val1 attr_accessor :val2 def initialize @val1 = @val2 = "A" end end module B attr_accessor :val3 attr_accessor :val4 def initialize @val3 = @val4 = "B" end end class MyClass include A, B def initialize super end end class MyClass2 include A include B def initialize super end end p MyClass.new p MyClass2.new elathan@velka:~> ruby gm.rb # # elathan@velka:~> ruby -v ruby 1.9.0 (2004-05-25) [i686-linux] Regards, -- University of Athens I bet the human brain Physics Department is a kludge --Marvin Minsky