HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/share/ri/3.0.0/system/Hash/update-i.ri
U:RDoc::AnyMethod[iI"update:ETI"Hash#update;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;	[I"?Merges each of +other_hashes+ into +self+; returns +self+.;To:RDoc::Markup::BlankLineo;
;	[I"5Each argument in +other_hashes+ must be a \Hash.;T@o;
;	[I".\Method #update is an alias for \#merge!.;T@o;
;	[I"!With arguments and no block:;To:RDoc::Markup::List:
@type:BULLET:@items[	o:RDoc::Markup::ListItem:@label0;	[o;
;	[I"?Returns +self+, after the given hashes are merged into it.;To;;0;	[o;
;	[I"/The given hashes are merged left to right.;To;;0;	[o;
;	[I"(Each new entry is added at the end.;To;;0;	[o;
;	[I"DEach duplicate-key entry's value overwrites the previous value.;T@o;
;	[I"
Example:;To:RDoc::Markup::Verbatim;	[	I""h = {foo: 0, bar: 1, baz: 2}
;TI"h1 = {bat: 3, bar: 4}
;TI"h2 = {bam: 5, bat:6}
;TI"Ih.merge!(h1, h2) # => {:foo=>0, :bar=>4, :baz=>2, :bat=>6, :bam=>5}
;T:@format0o;
;	[I" With arguments and a block:;To;;
;;[	o;;0;	[o;
;	[I"7Returns +self+, after the given hashes are merged.;To;;0;	[o;
;	[I"/The given hashes are merged left to right.;To;;0;	[o;
;	[I",Each new-key entry is added at the end.;To;;0;	[o;
;	[I"For each duplicate key:;To;;
;;[o;;0;	[o;
;	[I"=Calls the block with the key and the old and new values.;To;;0;	[o;
;	[I"BThe block's return value becomes the new value for the entry.;T@o;
;	[I"
Example:;To;;	[
I""h = {foo: 0, bar: 1, baz: 2}
;TI"h1 = {bat: 3, bar: 4}
;TI"h2 = {bam: 5, bat:6}
;TI"Qh3 = h.merge!(h1, h2) { |key, old_value, new_value| old_value + new_value }
;TI";h3 # => {:foo=>0, :bar=>5, :baz=>2, :bat=>9, :bam=>5}
;T;0o;
;	[I"With no arguments:;To;;
;;[o;;0;	[o;
;	[I" Returns +self+, unmodified.;To;;0;	[o;
;	[I"%The block, if given, is ignored.;T@o;
;	[I"
Example:;To;;	[	I""h = {foo: 0, bar: 1, baz: 2}
;TI".h.merge # => {:foo=>0, :bar=>1, :baz=>2}
;TI"Ih1 = h.merge! { |key, old_value, new_value| raise 'Cannot happen' }
;TI"(h1 # => {:foo=>0, :bar=>1, :baz=>2};T;0:
@fileI"hash.c;T:0@omit_headings_from_table_of_contents_below0I"~hash.merge! -> self
hash.merge!(*other_hashes) -> self
hash.merge!(*other_hashes) { |key, old_value, new_value| ... } -> self
;T0[[I"merge!;T@	I"(*args);T@~FI"	Hash;TcRDoc::NormalClass00