On Jan 24, 8:48 am, ara.t.how... / noaa.gov wrote:
>    harp:~ > cat a.rb
>    #
>    # take one
>    #
>      module M
>        def hello; 'M'; end
>      end
>      class C
>        def hello; 'C'; end
>      end
>      class D < C; end
>      class C; include M; end
>      class D; include M; end
>      p D.ancestors                      #=> [D, C, M, Object, Kernel]

I think the issue here is that essential no-op:

  module M; end
  class C; end
  class D < C; end

  class C; include M; end
  x = D.ancestors
  class D; include M; end
  y = D.ancestors

  p x==y
  #=> true

The issue is that Ruby says "Hey, M is already in your ancestor
list...I'm going to prevent you from inserting it into the chain at a
lower level."

Seems like a bug, like it should only prevent the M inclusion if it's
already included directly in the class.