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.
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.
I guess include_ancestors here means "modules prepended by prepended modules":
module A; end
module B; prepend A; end
module C; prepend B; end
C.prepended_modules(true) #=> [A, B]
C.prepended_modules(false) #=> [B]
So, include_ancestors is not a good name; should it be called include_descendants?
Now I'm unsure if the feature is worth adding. It was accepted six years ago, but not implemented yet. I've never heard any actual trouble due to the lack.