Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
proc
/
thread-self
/
root
/
proc
/
self
/
root
/
opt
/
ruby-2.6
/
usr
/
share
/
ri
/
2.6.0
/
system
/
Object
/
//proc/thread-self/root/proc/self/root/opt/ruby-2.6/usr/share/ri/2.6.0/system/Object/clone-i.ri
U:RDoc::AnyMethod[iI" clone:ETI"Object#clone;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [ I"GProduces a shallow copy of <i>obj</i>---the instance variables of ;TI"@<i>obj</i> are copied, but not the objects they reference. ;TI"K<code>clone</code> copies the frozen (unless :freeze keyword argument ;TI"Cis given with a false value) and tainted state of <i>obj</i>. ;TI";See also the discussion under <code>Object#dup</code>.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"class Klass ;TI" attr_accessor :str ;TI" end ;TI"1s1 = Klass.new #=> #<Klass:0x401b3a38> ;TI"%s1.str = "Hello" #=> "Hello" ;TI">s2 = s1.clone #=> #<Klass:0x401b3998 @str="Hello"> ;TI"!s2.str[1,4] = "i" #=> "i" ;TI"?s1.inspect #=> "#<Klass:0x401b3a38 @str=\"Hi\">" ;TI"?s2.inspect #=> "#<Klass:0x401b3998 @str=\"Hi\">" ;T:@format0o; ; [I"@This method may have class-specific behavior. If so, that ;TI"Hbehavior will be documented under the #+initialize_copy+ method of ;TI"the class.;T: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"*obj.clone(freeze: true) -> an_object ;T0[ I"(*args);T@#FI"Object;TcRDoc::NormalClass00