* object.c (Init_Object): Add reference to BasicObject, brief
explanation of constant lookup. Based on patch by Alvaro Pereyra Rabanal. [Ruby 1.9 - Bug #5426] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
91e013c709
commit
ee8fd5f197
@ -1,3 +1,10 @@
|
|||||||
|
Tue Oct 11 05:53:23 2011 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
|
* object.c (Init_Object): Add reference to BasicObject, brief
|
||||||
|
explanation of constant lookup. Based on patch by Alvaro Pereyra
|
||||||
|
Rabanal.
|
||||||
|
[Ruby 1.9 - Bug #5426]
|
||||||
|
|
||||||
Sun Oct 9 11:06:52 2011 Kazuki Tsujimoto <kazuki@callcc.net>
|
Sun Oct 9 11:06:52 2011 Kazuki Tsujimoto <kazuki@callcc.net>
|
||||||
|
|
||||||
* test/psych/test_yamldbm.rb: don't run test if the system
|
* test/psych/test_yamldbm.rb: don't run test if the system
|
||||||
|
25
object.c
25
object.c
@ -2544,10 +2544,16 @@ rb_f_array(VALUE obj, VALUE arg)
|
|||||||
* Classes in Ruby are first-class objects---each is an instance of
|
* Classes in Ruby are first-class objects---each is an instance of
|
||||||
* class <code>Class</code>.
|
* class <code>Class</code>.
|
||||||
*
|
*
|
||||||
* When a new class is created (typically using <code>class Name ...
|
* Typically, you create a new class by using:
|
||||||
* end</code>), an object of type <code>Class</code> is created and
|
*
|
||||||
* assigned to a global constant (<code>Name</code> in this case). When
|
* class Name
|
||||||
* <code>Name.new</code> is called to create a new object, the
|
* # 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 (<code>Name</code> in this case).
|
||||||
|
*
|
||||||
|
* When <code>Name.new</code> is called to create a new object, the
|
||||||
* <code>new</code> method in <code>Class</code> is run by default.
|
* <code>new</code> method in <code>Class</code> is run by default.
|
||||||
* This can be demonstrated by overriding <code>new</code> in
|
* This can be demonstrated by overriding <code>new</code> in
|
||||||
* <code>Class</code>:
|
* <code>Class</code>:
|
||||||
@ -2670,13 +2676,18 @@ rb_f_array(VALUE obj, VALUE arg)
|
|||||||
|
|
||||||
/* Document-class: Object
|
/* Document-class: Object
|
||||||
*
|
*
|
||||||
* Object is the root of Ruby's class hierarchy. Its methods are available
|
* Object is the default root of all Ruby objects. Object inherits from
|
||||||
* to all classes unless explicitly overridden.
|
* BasicObject which allows creating alternate object hierarchies. Methods
|
||||||
|
* on object are available to all classes unless explicitly overridden.
|
||||||
*
|
*
|
||||||
* Object mixes in the Kernel module, making the built-in kernel functions
|
* Object mixes in the Kernel module, making the built-in kernel functions
|
||||||
* globally accessible. Although the instance methods of Object are defined
|
* globally accessible. Although the instance methods of Object are defined
|
||||||
* by the Kernel module, we have chosen to document them here for clarity.
|
* by the Kernel module, we have chosen to document them here for clarity.
|
||||||
*
|
*
|
||||||
|
* When referencing constants in classes inheriting from Object you do not
|
||||||
|
* need to use the full namespace. For example, referencing +File+ inside
|
||||||
|
* +YourClass+ will find the top-level File class.
|
||||||
|
*
|
||||||
* In the descriptions of Object's methods, the parameter <i>symbol</i> refers
|
* In the descriptions of Object's methods, the parameter <i>symbol</i> refers
|
||||||
* to a symbol, which is either a quoted string or a Symbol (such as
|
* to a symbol, which is either a quoted string or a Symbol (such as
|
||||||
* <code>:name</code>).
|
* <code>:name</code>).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user