From: "marcandre (Marc-Andre Lafortune)" <ruby-core@...>
Date: 2012-06-28T03:16:48+09:00
Subject: [ruby-core:45919] [ruby-trunk - Bug #6658][Open] Module#ancestors & prepend


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/