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 | |
| 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
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | object.c | 13 |
2 files changed, 15 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Sun Jun 22 09:51:14 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * object.c (rb_class_superclass): rdoc improvement, a patch from + Gaston Ramos <ramos.gaston AT gmail.com> in [ruby-core:17371]. + Sun Jun 22 07:16:42 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * string.c (str_buf_cat): check for self concatenation. @@ -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 * */ |
