mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* gc.c (rb_obj_id): [DOC] Fix typo, clean up sentence, and wrap cols
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
329b2f472c
commit
f9deff9759
2 changed files with 10 additions and 5 deletions
|
@ -1,3 +1,7 @@
|
|||
Wed Oct 15 04:56:27 2014 Zachary Scott <e@zzak.io>
|
||||
|
||||
* gc.c (rb_obj_id): [DOC] Fix typo, clean up sentence, and wrap cols
|
||||
|
||||
Wed Oct 15 04:53:30 2014 Zachary Scott <e@zzak.io>
|
||||
|
||||
* error.c: [DOC] Fix case of type in exception message by @tricknotes
|
||||
|
|
11
gc.c
11
gc.c
|
@ -2716,13 +2716,14 @@ id2ref(VALUE obj, VALUE objid)
|
|||
*
|
||||
* Returns an integer identifier for +obj+.
|
||||
*
|
||||
* The same number will be returned on all calls to +object_id+ for a given object,
|
||||
* and no two active objects will share an id.
|
||||
* The same number will be returned on all calls to +object_id+ for a given
|
||||
* object, and no two active objects will share an id.
|
||||
*
|
||||
* Note: that some objects of builtin classes are reused for optimization.
|
||||
* This is the case for immediate values and frozen string literals.
|
||||
*
|
||||
* Note that some objects of builtin classes are reused for optimization.
|
||||
* This is the case for immediate values and frozen string litterals.
|
||||
* Immediate values are not passed by reference but are passed by value:
|
||||
* +nil+, +true+, +false+, Fixnums, Symbols. Some Floats may be immediates too.
|
||||
* +nil+, +true+, +false+, Fixnums, Symbols, and some Floats.
|
||||
*
|
||||
* Object.new.object_id == Object.new.object_id # => false
|
||||
* (21 * 2).object_id == (21 * 2).object_id # => true
|
||||
|
|
Loading…
Add table
Reference in a new issue