diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-10-13 09:25:15 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-10-13 09:25:15 +0000 |
commit | 3873d0fba36db7aa8d6a0b57e1dd1f1df1fa4e46 (patch) | |
tree | b1e43a5ea151214438214bc0565296bd28d15d89 /object.c | |
parent | 53b4c90110c78fa8b9560b81ededa01f48bed72d (diff) |
* object.c: Class#inherited RDoc added. a patch from Daniel
Berger <djberg96 at gmail.com> [ruby-core:08942]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 29 |
1 files changed, 28 insertions, 1 deletions
@@ -410,6 +410,34 @@ rb_obj_is_kind_of(VALUE obj, VALUE c) /* + * Document-method: inherited + * + * call-seq: + * inherited(subclass) + * + * Callback invoked whenever a subclass of the current class is created. + * + * Example: + * + * class Foo + * def self.inherited(subclass) + * puts "New subclass: #{subclass}" + * end + * end + * + * class Bar < Foo + * end + * + * class Baz < Bar + * end + * + * produces: + * + * New subclass: Bar + * New subclass: Baz + */ + +/* * Document-method: singleton_method_added * * call-seq: @@ -520,7 +548,6 @@ rb_obj_dummy(void) return Qnil; } - /* * call-seq: * obj.tainted? => true or false |