diff options
author | Marc-Andre Lafortune <github@marc-andre.ca> | 2020-01-16 13:28:37 -0600 |
---|---|---|
committer | Marc-Andre Lafortune <github@marc-andre.ca> | 2020-01-16 13:31:25 -0600 |
commit | 8ab11096ef3e0cf594308da285af2257cb4f5291 (patch) | |
tree | 5a8b4a4669a0c65dae34a9c2c019916af0325027 | |
parent | 95301378fc3b41528b4264de54722a0e7be0e875 (diff) | |
download | ruby-8ab11096ef3e0cf594308da285af2257cb4f5291.tar.gz |
Clarify documentation for Module#included_modules and Module#included?
[DOC] [ci skip] [Bug #8841]
-rw-r--r-- | class.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -1022,17 +1022,22 @@ rb_prepend_module(VALUE klass, VALUE module) * call-seq: * mod.included_modules -> array * - * Returns the list of modules included in <i>mod</i>. + * Returns the list of modules included or prepended in <i>mod</i> + * or one of <i>mod</i>'s ancestors. + * + * module Sub + * end * * module Mixin + * prepend Sub * end * * module Outer * include Mixin * end * - * Mixin.included_modules #=> [] - * Outer.included_modules #=> [Mixin] + * Mixin.included_modules #=> [Sub] + * Outer.included_modules #=> [Sub, Mixin] */ VALUE @@ -1056,8 +1061,8 @@ rb_mod_included_modules(VALUE mod) * call-seq: * mod.include?(module) -> true or false * - * Returns <code>true</code> if <i>module</i> is included in - * <i>mod</i> or one of <i>mod</i>'s ancestors. + * Returns <code>true</code> if <i>module</i> is included + * or prepended in <i>mod</i> or one of <i>mod</i>'s ancestors. * * module A * end |