⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.165
Server IP:
162.254.39.145
Server:
Linux premium289.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Server Software:
LiteSpeed
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
opt
/
alt
/
ruby18
/
share
/
ri
/
1.8
/
system
/
Array
/
View File Name :
fill-i.yaml
--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: The first three forms set the selected elements of <em>self</em> (which may be the entire array) to <em>obj</em>. A <em>start</em> of <tt>nil</tt> is equivalent to zero. A <em>length</em> of <tt>nil</tt> is equivalent to <em>self.length</em>. The last three forms fill the array with the value of the block. The block is passed the absolute index of each element to be filled. - !ruby/struct:SM::Flow::VERB body: " a = [ "a", "b", "c", "d" ]\n a.fill("x") #=> ["x", "x", "x", "x"]\n a.fill("z", 2, 2) #=> ["x", "x", "z", "z"]\n a.fill("y", 0..1) #=> ["y", "y", "z", "z"]\n a.fill {|i| i*i} #=> [0, 1, 4, 9]\n a.fill(-2) {|i| i*i*i} #=> [0, 1, 8, 27]\n" full_name: Array#fill is_singleton: false name: fill params: | array.fill(obj) -> array array.fill(obj, start [, length]) -> array array.fill(obj, range ) -> array array.fill {|index| block } -> array array.fill(start [, length] ) {|index| block } -> array array.fill(range) {|index| block } -> array visibility: public