Clarify documentation for Module#included_modules and Module#included?
[DOC] [ci skip] [Bug #8841]
This commit is contained in:
parent
95301378fc
commit
8ab11096ef
15
class.c
15
class.c
@ -1022,17 +1022,22 @@ rb_prepend_module(VALUE klass, VALUE module)
|
|||||||
* call-seq:
|
* call-seq:
|
||||||
* mod.included_modules -> array
|
* 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
|
* module Mixin
|
||||||
|
* prepend Sub
|
||||||
* end
|
* end
|
||||||
*
|
*
|
||||||
* module Outer
|
* module Outer
|
||||||
* include Mixin
|
* include Mixin
|
||||||
* end
|
* end
|
||||||
*
|
*
|
||||||
* Mixin.included_modules #=> []
|
* Mixin.included_modules #=> [Sub]
|
||||||
* Outer.included_modules #=> [Mixin]
|
* Outer.included_modules #=> [Sub, Mixin]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
@ -1056,8 +1061,8 @@ rb_mod_included_modules(VALUE mod)
|
|||||||
* call-seq:
|
* call-seq:
|
||||||
* mod.include?(module) -> true or false
|
* mod.include?(module) -> true or false
|
||||||
*
|
*
|
||||||
* Returns <code>true</code> if <i>module</i> is included in
|
* Returns <code>true</code> if <i>module</i> is included
|
||||||
* <i>mod</i> or one of <i>mod</i>'s ancestors.
|
* or prepended in <i>mod</i> or one of <i>mod</i>'s ancestors.
|
||||||
*
|
*
|
||||||
* module A
|
* module A
|
||||||
* end
|
* end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user