⚝
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
/
View File Name :
update-c.ri
U:RDoc::AnyMethod[iI"update:ETI"ENV::update;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"+ENV.update is an alias for ENV.merge!.;To:RDoc::Markup::BlankLine o; ; [I"FAdds to ENV each key/value pair in the given +hash+; returns ENV:;To:RDoc::Markup::Verbatim; [I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"bENV.merge!('baz' => '2', 'bat' => '3') # => {"bar"=>"1", "bat"=>"3", "baz"=>"2", "foo"=>"0"} ;T:@format0o; ; [I":Deletes the ENV entry for a hash value that is +nil+:;To;; [I"JENV.merge!('baz' => nil, 'bat' => nil) # => {"bar"=>"1", "foo"=>"0"} ;T; 0o; ; [I"OFor an already-existing name, if no block given, overwrites the ENV value:;To;; [I"
'4') # => {"bar"=>"1", "foo"=>"4"} ;T; 0o; ; [I"3For an already-existing name, if block given, ;TI"9yields the name, its ENV value, and its hash value; ;TI"3the block's return value becomes the new name:;To;; [I"oENV.merge!('foo' => '5') { |name, env_val, hash_val | env_val + hash_val } # => {"bar"=>"1", "foo"=>"45"} ;T; 0o; ; [I"7Raises an exception if a name or value is invalid ;TI"Q(see {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values]);;To;; [ I"-ENV.replace('foo' => '0', 'bar' => '1') ;TI"{ENV.merge!('foo' => '6', :bar => '7', 'baz' => '9') # Raises TypeError (no implicit conversion of Symbol into String) ;TI"'ENV # => {"bar"=>"1", "foo"=>"6"} ;TI"{ENV.merge!('foo' => '7', 'bar' => 8, 'baz' => '9') # Raises TypeError (no implicit conversion of Integer into String) ;TI"'ENV # => {"bar"=>"1", "foo"=>"7"} ;T; 0o; ; [I"?Raises an exception if the block returns an invalid name: ;TI"Q(see {Invalid Names and Values}[#class-ENV-label-Invalid+Names+and+Values]):;To;; [I"ENV.merge!('bat' => '8', 'foo' => '9') { |name, env_val, hash_val | 10 } # Raises TypeError (no implicit conversion of Integer into String) ;TI"3ENV # => {"bar"=>"1", "bat"=>"8", "foo"=>"7"} ;T; 0o; ; [I")Note that for the exceptions above, ;TI"Khash pairs preceding an invalid name or value are processed normally; ;TI"!those following are ignored.;T: @fileI"hash.c;T:0@omit_headings_from_table_of_contents_below0I"šENV.update(hash) -> ENV ENV.update(hash) { |name, env_val, hash_val| block } -> ENV ENV.merge!(hash) -> ENV ENV.merge!(hash) { |name, env_val, hash_val| block } -> ENV ;T0[ I" (p1);T@BFI"ENV;TcRDoc::NormalClass00