⚝
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
/
ENV
/
Edit File: to_h-c.ri
U:RDoc::AnyMethod[iI" to_h:ETI"ENV::to_h;TT:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"LWith no block, returns a Hash containing all name/value pairs from ENV:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI",ENV.to_h # => {"bar"=>"1", "foo"=>"0"} ;T:@format0o; ; [ I"KWith a block, returns a Hash whose items are determined by the block. ;TI":Each name/value pair in ENV is yielded to the block. ;TI"?The block must return a 2-element Array (name/value pair) ;TI"9that is added to the return Hash as a key and value:;To;; [I"RENV.to_h { |name, value| [name.to_sym, value.to_i] } # => {:bar=>1, :foo=>0} ;T;0o; ; [I"?Raises an exception if the block does not return an Array:;To;; [I"eENV.to_h { |name, value| name } # Raises TypeError (wrong element type String (expected array)) ;T;0o; ; [I"IRaises an exception if the block returns an Array of the wrong size:;To;; [I"rENV.to_h { |name, value| [name] } # Raises ArgumentError (element has wrong array length (expected 2, was 1));T;0: @fileI"hash.c;T:0@omit_headings_from_table_of_contents_below0I"}ENV.to_h -> hash of name/value pairs ENV.to_h {|name, value| block } -> hash of name/value pairs ;T0[ I"();T@'FI"ENV;TcRDoc::NormalClass00
Simpan