From fa57f78b9b1c5a1e80ddc5114949479791e02872 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/trunk@17533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- object.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'object.c') diff --git a/object.c b/object.c index e4f513763e..83b541b205 100644 --- a/object.c +++ b/object.c @@ -1437,6 +1437,12 @@ rb_class_new_instance(int argc, VALUE *argv, VALUE klass) * File.superclass #=> IO * IO.superclass #=> Object * Object.superclass #=> BasicObject + * class Foo; end + * class Bar < Foo; end + * Bar.superclass #=> Foo + * + * returns nil when the given class hasn't a parent class: + * * BasicObject.superclass #=> nil * */ -- cgit v1.2.3