mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* object.c (rb_obj_clone, rb_obj_dup): mentioned about
initialize_copy. [ruby-core:02339] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
beee54c7ce
commit
509fa97431
1 changed files with 8 additions and 0 deletions
8
object.c
8
object.c
|
@ -246,6 +246,10 @@ init_copy(dest, obj)
|
|||
* s2.str[1,4] = "i" #=> "i"
|
||||
* s1.inspect #=> "#<Klass:0x401b3a38 @str=\"Hi\">"
|
||||
* s2.inspect #=> "#<Klass:0x401b3998 @str=\"Hi\">"
|
||||
*
|
||||
* This method may have class-specific behavior. If so, that
|
||||
* behavior will be documented under the #+initialize_copy+ method of
|
||||
* the class.
|
||||
*/
|
||||
|
||||
VALUE
|
||||
|
@ -278,6 +282,10 @@ rb_obj_clone(obj)
|
|||
* in descendent classes. While <code>clone</code> is used to duplicate
|
||||
* an object, including its internal state, <code>dup</code> typically
|
||||
* uses the class of the descendent object to create the new instance.
|
||||
*
|
||||
* This method may have class-specific behavior. If so, that
|
||||
* behavior will be documented under the #+initialize_copy+ method of
|
||||
* the class.
|
||||
*/
|
||||
|
||||
VALUE
|
||||
|
|
Loading…
Add table
Reference in a new issue