Issue #8026 has been updated by marcandre (Marc-Andre Lafortune).

File prepended.pdf added

Slide added. I'm also proposing an optional flag to search only the receiver and not the ancestors.

I didn't put in `prepend?` but it should also be added. On the other hand, `Array.prepend?(Enumerable)` should return false, no?
----------------------------------------
Feature #8026: Need Module#prepended_modules
https://bugs.ruby-lang.org/issues/8026#change-41444

Author: marcandre (Marc-Andre Lafortune)
Status: Open
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category: core
Target version: current: 2.1.0


We should have a way to get the list of prepended modules of a class or module.

    module Mixin
    end

    module Outer
      prepend Mixin
    end

    Mixin.prepended_modules   #=> []
    Outer.prepended_modules   #=> [Mixin]

See also bug #8025.


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