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/Array/to_h-i.ri
U:RDoc::AnyMethod[iI"	to_h:ETI"Array#to_h;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;	[I",Returns a new \Hash formed from +self+.;To:RDoc::Markup::BlankLineo;
;	[I"EWhen a block is given, calls the block with each array element; ;TI"Athe block must return a 2-element \Array whose two elements ;TI"1form a key-value pair in the returned \Hash:;To:RDoc::Markup::Verbatim;	[I",a = ['foo', :bar, 1, [2, 3], {baz: 4}]
;TI"'h = a.to_h {|item| [item, item] }
;TI"Sh # => {"foo"=>"foo", :bar=>:bar, 1=>1, [2, 3]=>[2, 3], {:baz=>4}=>{:baz=>4}}
;T:@format0o;
;	[I"OWhen no block is given, +self+ must be an \Array of 2-element sub-arrays, ;TI"Eeach sub-array is formed into a key-value pair in the new \Hash:;To;;	[	I"[].to_h # => {}
;TI";a = [['foo', 'zero'], ['bar', 'one'], ['baz', 'two']]
;TI"h = a.to_h
;TI"7h # => {"foo"=>"zero", "bar"=>"one", "baz"=>"two"};T;
0:
@fileI"array.c;T:0@omit_headings_from_table_of_contents_below0I"Aarray.to_h -> new_hash
array.to_h {|item| ... } -> new_hash
;T0[I"();T@#FI"
Array;TcRDoc::NormalClass00