Actions
Bug #6658
closedModule#ancestors & prepend
Description
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]
Updated by nobu (Nobuyoshi Nakada) over 12 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r36241.
Marc-Andre, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
prepend: fix ancestors order
- class.c (rb_mod_ancestors): fix ancestors order.
[ruby-core:45919][Bug #6658] [ruby-dev:45861][Bug #6659]
Actions
Like0
Like0