0001-updates-object-information.patch

Alvaro Pereyra Rabanal, 10/09/2011 08:09 AM

Download (2.29 KB)

View differences:

object.c
2544 2544
 *  Classes in Ruby are first-class objects---each is an instance of
2545 2545
 *  class <code>Class</code>.
2546 2546
 *
2547
 *  When a new class is created (typically using <code>class Name ...
2548
 *  end</code>), an object of type <code>Class</code> is created and
2549
 *  assigned to a global constant (<code>Name</code> in this case). When
2550
 *  <code>Name.new</code> is called to create a new object, the
2547
 *  Typically, you create a new class by using:
2548
 *
2549
 *    class Name
2550
 *     # some class describing the class behavior
2551
 *    end
2552
 *
2553
 *  When a new class is created, an object of type <code>Class</code> 
2554
 *  is initialized and assigned to a global constant (<code>Name</code>
2555
 *  in this case). 
2556
 *
2557
 *  When <code>Name.new</code> is called to create a new object, the
2551 2558
 *  <code>new</code> method in <code>Class</code> is run by default.
2552 2559
 *  This can be demonstrated by overriding <code>new</code> in
2553 2560
 *  <code>Class</code>:
......
2670 2677

  
2671 2678
/*  Document-class: Object
2672 2679
 *
2673
 *  Object is the root of Ruby's class hierarchy.  Its methods are available
2674
 *  to all classes unless explicitly overridden.
2680
 *  Object is the root of Ruby's class hierarchy, except from BasicObject
2681
 *  from which it inherits. Its methods are available to all classes unless 
2682
 *  explicitly overridden.
2675 2683
 *
2676 2684
 *  Object mixes in the Kernel module, making the built-in kernel functions
2677 2685
 *  globally accessible. Although the instance methods of Object are defined
2678 2686
 *  by the Kernel module, we have chosen to document them here for clarity.
2687
 * 
2688
 *  Different from BasicObject, it is not outside of the namespace of the 
2689
 *  standard library. Common classes do not need to be found with a full class 
2690
 *  path.
2679 2691
 *
2680 2692
 *  In the descriptions of Object's methods, the parameter <i>symbol</i> refers
2681 2693
 *  to a symbol, which is either a quoted string or a Symbol (such as
2682
-