From 98e4c03a5a2a4f6f3479dd11e3bcca8e03b586d8 Mon Sep 17 00:00:00 2001 From: Alvaro Pereyra Date: Sat, 8 Oct 2011 17:24:55 -0500 Subject: [PATCH] updates object information --- object.c | 24 ++++++++++++++++++------ 1 files changed, 18 insertions(+), 6 deletions(-) diff --git a/object.c b/object.c index 23c18ed..2b7a015 100644 --- a/object.c +++ b/object.c @@ -2544,10 +2544,17 @@ rb_f_array(VALUE obj, VALUE arg) * Classes in Ruby are first-class objects---each is an instance of * class Class. * - * When a new class is created (typically using class Name ... - * end), an object of type Class is created and - * assigned to a global constant (Name in this case). When - * Name.new is called to create a new object, the + * Typically, you create a new class by using: + * + * class Name + * # some class describing the class behavior + * end + * + * When a new class is created, an object of type Class + * is initialized and assigned to a global constant (Name + * in this case). + * + * When Name.new is called to create a new object, the * new method in Class is run by default. * This can be demonstrated by overriding new in * Class: @@ -2670,12 +2677,17 @@ rb_f_array(VALUE obj, VALUE arg) /* Document-class: Object * - * Object is the root of Ruby's class hierarchy. Its methods are available - * to all classes unless explicitly overridden. + * Object is the root of Ruby's class hierarchy, except from BasicObject + * from which it inherits. 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. + * + * Different from BasicObject, it is not outside of the namespace of the + * standard library. Common classes do not need to be found with a full class + * path. * * 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 -- 1.7.4.4