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.
#3 [ruby-core:56899] Updated by marcandre (Marc-Andre Lafortune) almost 4 years ago
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?
#4 [ruby-core:56917] Updated by matz (Yukihiro Matsumoto) almost 4 years ago
- Status changed from Open to Feedback
I basically accept the idea.
But according to the slide, the optional
include_ancestors is true, but it does mean cherry-picking prepended modules from ancestor list. I cannot think of any use case of this behavior.