зеркало из https://github.com/github/ruby.git
* gc.c: Oups, symbols are immediates too
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
705f9a7e80
Коммит
e5839862e4
2
gc.c
2
gc.c
|
@ -2343,7 +2343,7 @@ id2ref(VALUE obj, VALUE objid)
|
||||||
* Note that some objects of builtin classes are reused for optimization.
|
* Note that some objects of builtin classes are reused for optimization.
|
||||||
* This is the case for immediate values and frozen string litterals.
|
* This is the case for immediate values and frozen string litterals.
|
||||||
* Immediate values are not passed by reference by are passed by value:
|
* Immediate values are not passed by reference by are passed by value:
|
||||||
* +nil+, +true+, +false+, Fixnums. Some Floats may be immediates too.
|
* +nil+, +true+, +false+, Fixnums, Symbols. Some Floats may be immediates too.
|
||||||
*
|
*
|
||||||
* Object.new.object_id == Object.new.object_id # => false
|
* Object.new.object_id == Object.new.object_id # => false
|
||||||
* (21 * 2).object_id == (21 * 2).object_id # => true
|
* (21 * 2).object_id == (21 * 2).object_id # => true
|
||||||
|
|
Загрузка…
Ссылка в новой задаче