As of Ruby 1.9, when you include a module M in a class C, an anonymous 
class is created and becomes the immediate superclass of C and subclass 
of C's original superclass. All instance methods of M will be inherited 
by C in the same old way. So it is actually M#foo who gets overridden 
(by its subclass C#foo); C#foo never gets redefined. This is how Ruby 
currently resolves name conflicts raised during mixin.

If you call `super' in C#foo, it will route to M#foo.

class A
  def foo
    puts 'bar'
    super
  end
end

module Foo
  def foo
    puts 'foobar'
  end
end

A.send :include, Foo

a = A.new
a.foo # => bar\nfoobar

-- 
Posted via http://www.ruby-forum.com/.