зеркало из https://github.com/github/ruby.git
Document BasicObject does not implement #object_id and #send [ci skip]
Fixes [Bug #10422]
This commit is contained in:
Родитель
32ec6dd5c7
Коммит
01995df645
2
gc.c
2
gc.c
|
@ -3489,6 +3489,8 @@ rb_memory_id(VALUE obj)
|
|||
* Note: that some objects of builtin classes are reused for optimization.
|
||||
* This is the case for immediate values and frozen string literals.
|
||||
*
|
||||
* BasicObject implements +__id__+, Kernel implements +object_id+.
|
||||
*
|
||||
* Immediate values are not passed by reference but are passed by value:
|
||||
* +nil+, +true+, +false+, Fixnums, Symbols, and some Floats.
|
||||
*
|
||||
|
|
|
@ -951,6 +951,8 @@ send_internal(int argc, const VALUE *argv, VALUE recv, call_type scope)
|
|||
* When the method is identified by a string, the string is converted
|
||||
* to a symbol.
|
||||
*
|
||||
* BasicObject implements +__send__+, Kernel implements +send+.
|
||||
*
|
||||
* class Klass
|
||||
* def hello(*args)
|
||||
* "Hello " + args.join(' ')
|
||||
|
|
Загрузка…
Ссылка в новой задаче