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

ruby-changes:29811

From: hsbt <ko1@a...>
Date: Tue, 9 Jul 2013 21:03:17 +0900 (JST)
Subject: [ruby-changes:29811] hsbt:r41863 (trunk): Module extended doc by @PragTob [fixes GH-335]

hsbt	2013-07-09 21:03:07 +0900 (Tue, 09 Jul 2013)

  New Revision: 41863

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

  Log:
    Module extended doc by @PragTob [fixes GH-335]

  Modified files:
    trunk/object.c

Index: object.c
===================================================================
--- object.c	(revision 41862)
+++ object.c	(revision 41863)
@@ -806,12 +806,30 @@ rb_obj_tap(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L806
  *     Undefining one
  */
 
+/*
+ * Document-method: extended
+ *
+ * call-seq:
+ *    extended(othermod)
+ *
+ * The equivalent of <tt>included</tt>, but for extended modules.
+ *
+ *        module A
+ *          def self.extended(mod)
+ *            puts "#{self} extended in #{mod}"
+ *          end
+ *        end
+ *        module Enumerable
+ *          extend A
+ *        end
+ *         # => prints "A extended in Enumerable"
+ */
 
 /*
  * Document-method: included
  *
  * call-seq:
- *    included( othermod )
+ *    included(othermod)
  *
  * Callback invoked whenever the receiver is included in another
  * module or class. This should be used in preference to
@@ -833,7 +851,7 @@ rb_obj_tap(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L851
  * Document-method: prepended
  *
  * call-seq:
- *    prepended( othermod )
+ *    prepended(othermod)
  *
  * The equivalent of <tt>included</tt>, but for prepended modules.
  *

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

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