[前][次][番号順一覧][スレッド一覧]

ruby-changes:34619

From: ktsj <ko1@a...>
Date: Sat, 5 Jul 2014 14:13:41 +0900 (JST)
Subject: [ruby-changes:34619] ktsj:r46702 (trunk): * class.c: [DOC] mention about prepended modules.

ktsj	2014-07-05 14:13:28 +0900 (Sat, 05 Jul 2014)

  New Revision: 46702

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46702

  Log:
    * class.c: [DOC] mention about prepended modules.

  Modified files:
    trunk/class.c
Index: class.c
===================================================================
--- class.c	(revision 46701)
+++ class.c	(revision 46702)
@@ -1041,16 +1041,18 @@ rb_mod_include_p(VALUE mod, VALUE mod2) https://github.com/ruby/ruby/blob/trunk/class.c#L1041
  *  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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]