U:RDoc::AnyMethod[iI"zip:ETI"Enumerable#zip;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [
I"ATakes one element from enum and merges corresponding ;TI"Celements from each args. This generates a sequence of ;TI"Fn-element arrays, where n is one more than the ;TI"Gcount of arguments. The length of the resulting sequence will be ;TI"Genum#size
. If the size of any argument is less than ;TI"Fenum#size
, nil
values are supplied. If ;TI"Fa block is given, it is invoked for each output array, otherwise ;TI"$an array of arrays is returned.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"a = [ 4, 5, 6 ]
;TI"b = [ 7, 8, 9 ]
;TI"
;TI";a.zip(b) #=> [[4, 7], [5, 8], [6, 9]]
;TI"D[1, 2, 3].zip(a, b) #=> [[1, 4, 7], [2, 5, 8], [3, 6, 9]]
;TI"9[1, 2].zip(a, b) #=> [[1, 4, 7], [2, 5, 8]]
;TI"Ja.zip([1, 2], [8]) #=> [[4, 1, 8], [5, 2, nil], [6, nil, nil]]
;TI"
;TI"c = []
;TI"-a.zip(b) { |x, y| c << x + y } #=> nil
;TI"5c #=> [11, 13, 15];T:@format0:
@fileI"enum.c;T:0@omit_headings_from_table_of_contents_below0I"ienum.zip(arg, ...) -> an_array_of_array
enum.zip(arg, ...) { |arr| block } -> nil
;T0[ I"(*args);T@#FI"Enumerable;TcRDoc::NormalModule00