1
0
Fork 0
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:
ktsj 2014-07-05 05:13:28 +00:00
parent 566f1e7184
commit 5a60ddc56d

10
class.c
View file

@ -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