summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-22 23:33:51 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-22 23:33:51 +0000
commit7c8a4774168d5d31b59d2b3a7aa1a0e2c8227041 (patch)
treedcccc1e43cff44e53678709f747fab5007217562 /object.c
parent9f9c04262a736113fbdcc4bb6a970f47babe3a96 (diff)
* backport r39400-r39407 from trunk.
* NEWS: many additions * object.c: Add doc for Module.prepended git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/object.c b/object.c
index ba4f997b3a..b3222e56e7 100644
--- a/object.c
+++ b/object.c
@@ -790,6 +790,26 @@ rb_obj_tap(VALUE obj)
* module Enumerable
* include A
* end
+ * # => prints "A included in Enumerable"
+ */
+
+/*
+ * Document-method: prepended
+ *
+ * call-seq:
+ * prepended( othermod )
+ *
+ * The equivalent of <tt>included</tt>, but for prepended modules.
+ *
+ * module A
+ * def self.prepended(mod)
+ * puts "#{self} prepended to #{mod}"
+ * end
+ * end
+ * module Enumerable
+ * prepend A
+ * end
+ * # => prints "A prepended to Enumerable"
*/
/*