diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-22 00:51:17 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-22 00:51:17 +0000 |
commit | 0fad046449243cf63e09f2f2a6a976c0f8f4e32e (patch) | |
tree | 1697747393db2a3fcfbba8e23d9f39bc31847b76 /object.c | |
parent | bef75368b1edd24323f8f873ed9c5f3ca9e70ec0 (diff) |
* object.c (rb_class_superclass): rdoc improvement, a patch from
Gaston Ramos <ramos.gaston AT gmail.com> in [ruby-core:17371].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@17533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -1652,9 +1652,16 @@ rb_class_new_instance(argc, argv, klass) * * Returns the superclass of <i>class</i>, or <code>nil</code>. * - * File.superclass #=> IO - * IO.superclass #=> Object - * Object.superclass #=> nil + * File.superclass #=> IO + * IO.superclass #=> Object + * + * class Foo; end + * class Bar < Foo; end + * Bar.superclass #=> Foo + * + * returns nil when the given class hasn't a parent class: + * + * Object.superclass #=> nil * */ |