From 0de3c24ea2b82d1ae8114da19e1075a2e4ea1be7 Mon Sep 17 00:00:00 2001 From: drbrain Date: Mon, 27 Jun 2011 22:51:42 +0000 Subject: * object.c (Init_Object): Teach RDoc what Init_class_hierarchy does to hook up ri for BasicObject, Object, Module and Class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- object.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'object.c') diff --git a/object.c b/object.c index 8f2450db7a..93ff4780e6 100644 --- a/object.c +++ b/object.c @@ -2553,23 +2553,24 @@ rb_f_array(VALUE obj, VALUE arg) * \ingroup class */ -/* +/* Document-class: BasicObject + * + * BasicObject is the parent class of all classes in Ruby. It's an explicit + * blank class. + */ + +/* Document-class: Object * - * BasicObject is the parent class of all classes in Ruby. - * It's an explicit blank class. Object, the root of Ruby's - * class hierarchy is a direct subclass of BasicObject. Its - * methods are therefore available to all objects unless explicitly - * overridden. + * Object is the root of Ruby's class hierarchy. Its methods are available + * to all classes unless explicitly overridden. * - * Object mixes in the Kernel module, making - * the built-in kernel functions globally accessible. Although the - * instance methods of Object are defined by the - * Kernel module, we have chosen to document them here for - * clarity. + * Object mixes in the Kernel module, making the built-in kernel functions + * globally accessible. Although the instance methods of Object are defined + * by the Kernel module, we have chosen to document them here for clarity. * * In the descriptions of Object's methods, the parameter symbol refers - * to a symbol, which is either a quoted string or a - * Symbol (such as :name). + * to a symbol, which is either a quoted string or a Symbol (such as + * :name). */ void @@ -2579,6 +2580,14 @@ Init_Object(void) Init_class_hierarchy(); +#if 0 + // teach RDoc about these classes + rb_cBasicObject = rb_define_class("BasicObject", Qnil); + rb_cObject = rb_define_class("Object", rb_cBasicObject); + rb_cModule = rb_define_class("Module", rb_cObject); + rb_cClass = rb_define_class("Class", rb_cModule); +#endif + #undef rb_intern #define rb_intern(str) rb_intern_const(str) -- cgit v1.2.3