Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby27
/
share
/
ri
/
system
/
Hash
/
//opt/alt/ruby27/share/ri/system/Hash/update-i.ri
U:RDoc::AnyMethod[iI"update:ETI"Hash#update;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I";Adds the contents of the given hashes to the receiver.;To:RDoc::Markup::BlankLine o; ; [ I"GIf no block is given, entries with duplicate keys are overwritten ;TI":with the values from each +other_hash+ successively, ;TI"Aotherwise the value for each duplicate key is determined by ;TI"Ccalling the block with the key, its value in the receiver and ;TI"$its value in each +other_hash+.;T@o:RDoc::Markup::Verbatim; [I"%h1 = { "a" => 100, "b" => 200 } ;TI"1h1.merge! #=> {"a"=>100, "b"=>200} ;TI"1h1 #=> {"a"=>100, "b"=>200} ;TI" ;TI"%h1 = { "a" => 100, "b" => 200 } ;TI"%h2 = { "b" => 246, "c" => 300 } ;TI";h1.merge!(h2) #=> {"a"=>100, "b"=>246, "c"=>300} ;TI";h1 #=> {"a"=>100, "b"=>246, "c"=>300} ;TI" ;TI"%h1 = { "a" => 100, "b" => 200 } ;TI"%h2 = { "b" => 246, "c" => 300 } ;TI"%h3 = { "b" => 357, "d" => 400 } ;TI"h1.merge!(h2, h3) ;TI"E #=> {"a"=>100, "b"=>357, "c"=>300, "d"=>400} ;TI"Eh1 #=> {"a"=>100, "b"=>357, "c"=>300, "d"=>400} ;TI" ;TI"%h1 = { "a" => 100, "b" => 200 } ;TI"%h2 = { "b" => 246, "c" => 300 } ;TI"%h3 = { "b" => 357, "d" => 400 } ;TI"+h1.merge!(h2, h3) {|key, v1, v2| v1 } ;TI"E #=> {"a"=>100, "b"=>200, "c"=>300, "d"=>400} ;TI"Eh1 #=> {"a"=>100, "b"=>200, "c"=>300, "d"=>400} ;T:@format0o; ; [I"-Hash#update is an alias for Hash#merge!.;T: @fileI"hash.c;T:0@omit_headings_from_table_of_contents_below0I"�hsh.update(other_hash1, other_hash2, ...) -> hsh hsh.update(other_hash1, other_hash2, ...) {|key, oldval, newval| block};T0[ I"(*args);T@1FI" Hash;TcRDoc::NormalClass00