mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* class.c: [DOC] mention about prepended modules.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
566f1e7184
commit
5a60ddc56d
1 changed files with 6 additions and 4 deletions
10
class.c
10
class.c
|
@ -1041,16 +1041,18 @@ rb_mod_include_p(VALUE mod, VALUE mod2)
|
|||
* call-seq:
|
||||
* mod.ancestors -> array
|
||||
*
|
||||
* Returns a list of modules included in <i>mod</i> (including
|
||||
* <i>mod</i> itself).
|
||||
* Returns a list of modules included/prepended in <i>mod</i>
|
||||
* (including <i>mod</i> itself).
|
||||
*
|
||||
* module Mod
|
||||
* include Math
|
||||
* include Comparable
|
||||
* prepend Enumerable
|
||||
* end
|
||||
*
|
||||
* Mod.ancestors #=> [Mod, Comparable, Math]
|
||||
* Math.ancestors #=> [Math]
|
||||
* Mod.ancestors #=> [Enumerable, Mod, Comparable, Math]
|
||||
* Math.ancestors #=> [Math]
|
||||
* Enumerable.ancestors #=> [Enumerable]
|
||||
*/
|
||||
|
||||
VALUE
|
||||
|
|
Loading…
Reference in a new issue