⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.13
Server IP:
109.199.105.153
Server:
Linux connect.inboxifs.com 5.15.0-152-generic #162-Ubuntu SMP Wed Jul 23 09:48:42 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
3.0.0
/
system
/
Array
/
Edit File: 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::BlankLine o; ; [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
Simpan