diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-22 23:33:51 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-22 23:33:51 +0000 |
commit | 7c8a4774168d5d31b59d2b3a7aa1a0e2c8227041 (patch) | |
tree | dcccc1e43cff44e53678709f747fab5007217562 /object.c | |
parent | 9f9c04262a736113fbdcc4bb6a970f47babe3a96 (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.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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" */ /* |