From 0fad046449243cf63e09f2f2a6a976c0f8f4e32e Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 22 Jun 2008 00:51:17 +0000 Subject: * object.c (rb_class_superclass): rdoc improvement, a patch from Gaston Ramos in [ruby-core:17371]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@17533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ object.c | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 48baf4f4b1..53c258ac7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Jun 22 09:51:14 2008 Nobuyoshi Nakada + + * object.c (rb_class_superclass): rdoc improvement, a patch from + Gaston Ramos in [ruby-core:17371]. + Sun Jun 22 07:16:42 2008 Nobuyoshi Nakada * string.c (str_buf_cat): check for self concatenation. diff --git a/object.c b/object.c index 75153b843a..548e6acf2c 100644 --- a/object.c +++ b/object.c @@ -1652,9 +1652,16 @@ rb_class_new_instance(argc, argv, klass) * * Returns the superclass of class, or nil. * - * 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 * */ -- cgit v1.2.3