From: "marcandre (Marc-Andre Lafortune)" Date: 2013-04-30T10:09:54+09:00 Subject: [ruby-core:54704] [ruby-trunk - Bug #8298] Module include inconsistency Issue #8298 has been updated by marcandre (Marc-Andre Lafortune). Student (Nathan Zook) wrote: > 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) adressed one day. ---------------------------------------- Bug #8298: Module include inconsistency https://bugs.ruby-lang.org/issues/8298#change-39049 Author: Student (Nathan Zook) Status: Rejected Priority: Normal Assignee: Category: core Target version: current: 2.1.0 ruby -v: 1.8, 1.9, 2.0 Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN 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] This has been this way for a while... -- http://bugs.ruby-lang.org/