[ruby-core:96916] [Ruby master Bug#8841] Module#included_modules and prepended modules
From:
ruby-core@...
Date:
2020-01-16 19:32:05 UTC
List:
ruby-core #96916
Issue #8841 has been updated by marcandre (Marc-Andre Lafortune). Thank you. I clarified the documentation to reflect this. ---------------------------------------- Bug #8841: Module#included_modules and prepended modules https://bugs.ruby-lang.org/issues/8841#change-83934 * Author: marcandre (Marc-Andre Lafortune) * Status: Closed * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) * Target version: * ruby -v: r42735 * Backport: ---------------------------------------- The documentation for Module#included_modules currently states "Returns the list of modules included in +mod+." This was never perfectly accurate, as the list also contains modules included in +mod+'s ancestors. It now also includes prepended modules. This is consistent with `include?` that returns true for prepended modules, but not quite consistent with `included` that does not get called for prepended modules. Matz, could you confirm that current behavior is what you want? If so, we should fix the documentation of `include?` and `included_modules`. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>