It has been suggested that I report this as a violation of the object model:
module M ; end
module N ; end
class C ; include M ; end
module M ; include N ; end
c = C.new
c.extend M
d = class << c ; self ; end
d.ancestors
=>[N, C, M, Object, Kernel]
I think that perhaps I was too brief. My complaint is only that N precedes M (and C) in the ancestor list. The other matters are clear.
Indeed, it is a bit surprising. When including M, it manages to include N (because it's not in the ancestor list because of (1)) and then won't include M itself, because of (2).
For the record, (3) is already changed in trunk. I still hope to see (1) and (2) addressed one day.