Issue #6658 has been reported by marcandre (Marc-Andre Lafortune).

----------------------------------------
Bug #6658: Module#ancestors & prepend
https://bugs.ruby-lang.org/issues/6658

Author: marcandre (Marc-Andre Lafortune)
Status: Open
Priority: Normal
Assignee: 
Category: core
Target version: 2.0.0
ruby -v: r36240


Wouldn't it be best if `Module#ancestors` returned the modules & classes in the order they will be looked at?

Currently:

    module M; end
    class C; prepend M; end
    C.ancestors # => [C, M, Class, Object, Kernel, BasicObject]
     # even though actual lookup order is [M, C, Class, Object, Kernel, BasicObject]



-- 
http://bugs.ruby-lang.org/