PATH:
opt
/
alt
/
ruby18
/
share
/
ri
/
1.8
/
system
/
Array
--- !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
[-] pack-i.yaml
[edit]
[-] frozen%3f-i.yaml
[edit]
[-] reject-i.yaml
[edit]
[-] drop-i.yaml
[edit]
[-] %3c%3d%3e-i.yaml
[edit]
[-] size-i.yaml
[edit]
[-] compact%21-i.yaml
[edit]
[-] drop_while-i.yaml
[edit]
[-] product-i.yaml
[edit]
[-] concat-i.yaml
[edit]
[-] collect%21-i.yaml
[edit]
[-] pretty_print_cycle-i.yaml
[edit]
[-] flatten%21-i.yaml
[edit]
[-] fetch-i.yaml
[edit]
[-] reverse%21-i.yaml
[edit]
[-] %2a-i.yaml
[edit]
[-] to_ary-i.yaml
[edit]
[-] indices-i.yaml
[edit]
[-] empty%3f-i.yaml
[edit]
[-] to_yaml-i.yaml
[edit]
[-] values_at-i.yaml
[edit]
[-] last-i.yaml
[edit]
[-] hash-i.yaml
[edit]
[-] join-i.yaml
[edit]
[-] pretty_print-i.yaml
[edit]
[-] yaml_initialize-i.yaml
[edit]
[-] %5b%5d%3d-i.yaml
[edit]
[-] assoc-i.yaml
[edit]
[-] find_index-i.yaml
[edit]
[-] shelljoin-i.yaml
[edit]
[-] %2d-i.yaml
[edit]
[-] flatten-i.yaml
[edit]
[-] %3c%3c-i.yaml
[edit]
[-] cdesc-Array.yaml
[edit]
[-] pop-i.yaml
[edit]
[-] transpose-i.yaml
[edit]
[-] take-i.yaml
[edit]
[-] index-i.yaml
[edit]
[-] insert-i.yaml
[edit]
[-] include%3f-i.yaml
[edit]
[-] cycle-i.yaml
[edit]
[-] uniq-i.yaml
[edit]
[-] reverse_each-i.yaml
[edit]
[-] at-i.yaml
[edit]
[-] abbrev-i.yaml
[edit]
[-] initialize_copy-i.yaml
[edit]
[-] compact-i.yaml
[edit]
[-] map-i.yaml
[edit]
[-] %2b-i.yaml
[edit]
[-] inspect-i.yaml
[edit]
[-] choice-i.yaml
[edit]
[-] delete-i.yaml
[edit]
[-] unshift-i.yaml
[edit]
[-] nitems-i.yaml
[edit]
[-] uniq%21-i.yaml
[edit]
[-] combination-i.yaml
[edit]
[-] dclone-i.yaml
[edit]
[-] clear-i.yaml
[edit]
[-] each_index-i.yaml
[edit]
[-] rassoc-i.yaml
[edit]
[-] reject%21-i.yaml
[edit]
[-] push-i.yaml
[edit]
[-] %3d%3d-i.yaml
[edit]
[-] rindex-i.yaml
[edit]
[-] sort%21-i.yaml
[edit]
[-] permutation-i.yaml
[edit]
[-] %5b%5d-c.yaml
[edit]
[-] %5b%5d-i.yaml
[edit]
[-] to_a-i.yaml
[edit]
[-] take_while-i.yaml
[edit]
[-] map%21-i.yaml
[edit]
[-] collect-i.yaml
[edit]
[-] fill-i.yaml
[edit]
[-] eql%3f-i.yaml
[edit]
[-] delete_at-i.yaml
[edit]
[-] length-i.yaml
[edit]
[+]
..
[-] slice-i.yaml
[edit]
[-] delete_if-i.yaml
[edit]
[-] select-i.yaml
[edit]
[-] each-i.yaml
[edit]
[-] indexes-i.yaml
[edit]
[-] sort-i.yaml
[edit]
[-] new-c.yaml
[edit]
[-] shift-i.yaml
[edit]
[-] count-i.yaml
[edit]
[-] %26-i.yaml
[edit]
[-] %7c-i.yaml
[edit]
[-] to_s-i.yaml
[edit]
[-] replace-i.yaml
[edit]
[-] shuffle-i.yaml
[edit]
[-] slice%21-i.yaml
[edit]
[-] first-i.yaml
[edit]
[-] zip-i.yaml
[edit]
[-] shuffle%21-i.yaml
[edit]
[-] reverse-i.yaml
[edit]