Report abuse


			
class A
  def hello!
    "HELLO!"
  end
end

module C
  def hello!
    "HELLO FROM C!"
  end
end

class B < A
  include C

  def hello!
    super
  end
end

require 'test/unit'

class MixinVsInheritancePresedenceTest < Test::Unit::TestCase
  def setup
    @b = B.new
  end

  def test_that_module_takes_presedence_over_super_class
    assert_equal 'HELLO FROM C!', @b.hello!
  end
end