On 4/20/10, Daniel Berger <djberg96 / gmail.com> wrote: > It seems that when including multiple modules with identical method > names there are different results when using multiple includes versus > a single include with multiple arguments. In the the former case we > get a "last method definition wins" but in the latter it's "first > method definition wins". > > Is this expected behavior? If so, where is it documented? > > module X > def hello > puts "hello" > end > end > > module Y > def hello > puts "greetings" > end > end > > class Foo > include X > include Y > end > > class Bar > include X, Y > end > > Foo.new.hello # => greetings > Bar.new.hello # => hello I have seen this before as well. I would expect "include X, Y" to mean "include X", then "include Y". But instead it is equivalent to "include Y" then "include X".