ÿØÿà JFIF ÿÛ „ ( %!1!%)+//.383,7(-.+
-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ ¥2" ÿÄ ÿÄ J ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ ÿÄ * !1AQa‘"2q3±ð#b¡ÿÚ ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁTÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßwpŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
?>
.........................................
.............................................................................
ÿØÿà JFIF ÿÛ „
(
%!1!%)+//.383,7(-.+
-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ ¥2" ÿÄ
ÿÄ J ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ
ÿÄ * !1AQa‘"2q3±ð#b¡ÿÚ
? ¼QxJQaÍuò¸Zö
Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁTÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßwpŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
?>
.........................................
.............................................................................
????????????????????????????????????
????????????????????????????????????
ÿØÿà JFIF ÿÛ „ ( %!1!%)+//.383,7(-.+
-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ ¥2" ÿÄ ÿÄ J ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ ÿÄ * !1AQa‘"2q3±ð#b¡ÿÚ ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁTÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßwpŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
?>
.........................................
.............................................................................
ÿØÿà JFIF ÿÛ „
(
%!1!%)+//.383,7(-.+
-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ ¥2" ÿÄ
ÿÄ J ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ
ÿÄ * !1AQa‘"2q3±ð#b¡ÿÚ
? ¼QxJQaÍuò¸Zö
Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁTÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßwpŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
?>
.........................................
.............................................................................
????????????????????????????????????
????????????????????????????????????
U:RDoc::AnyMethod[iI"zip:ETI"Array#zip;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"QWith no block given, combines +self+ with the collection of +other_arrays+; ;TI"'returns a new array of sub-arrays:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"0[0, 1].zip(['zero', 'one'], [:zero, :one])
;TI"1# => [[0, "zero", :zero], [1, "one", :one]]
;T:@format0o;
; [I"Returned:;T@o:RDoc::Markup::List:
@type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o;
; [I"3The outer array is of size self.size.;To;;0; [o;
; [I">Each sub-array is of size other_arrays.size + 1.;To;;0; [o;
; [I"-The _nth_ sub-array contains (in order):;T@o;;;;[o;;0; [o;
; [I"!The _nth_ element of +self+.;To;;0; [o;
; [I"AThe _nth_ element of each of the other arrays, as available.;T@o;
; [I"
Example:;T@o;; [
I"a = [0, 1]
;TI"4zipped = a.zip(['zero', 'one'], [:zero, :one])
;TI"1# => [[0, "zero", :zero], [1, "one", :one]]
;TI"0zipped.size # => 2 # Same size as a.
;TI"=zipped.first.size # => 3 # Size of other arrays plus 1.
;T;
0o;
; [I"
;TI"[[:a0, :b0, :c0],
;TI" [:a1, :b1, :c1],
;TI" [:a2, :b2, :c2],
;TI" [:a3, :b3, :c3]]
;T;
0o;
; [I":When one of the other arrays is smaller than +self+, ;TI":pads the corresponding sub-array with +nil+ elements:;T@o;; [I"a = [:a0, :a1, :a2, :a3]
;TI"b = [:b0, :b1, :b2]
;TI"c = [:c0, :c1]
;TI"d = a.zip(b, c)
;TI"
pp d
;TI"
# =>
;TI"[[:a0, :b0, :c0],
;TI" [:a1, :b1, :c1],
;TI" [:a2, :b2, nil],
;TI" [:a3, nil, nil]]
;T;
0o;
; [I"9When one of the other arrays is larger than +self+, ;TI"%_ignores_ its trailing elements:;T@o;; [I"a = [:a0, :a1, :a2, :a3]
;TI"#b = [:b0, :b1, :b2, :b3, :b4]
;TI"(c = [:c0, :c1, :c2, :c3, :c4, :c5]
;TI"d = a.zip(b, c)
;TI"
pp d
;TI"
# =>
;TI"[[:a0, :b0, :c0],
;TI" [:a1, :b1, :c1],
;TI" [:a2, :b2, :c2],
;TI" [:a3, :b3, :c3]]
;T;
0o;
; [I"HWith a block given, calls the block with each of the other arrays; ;TI"returns +nil+:;T@o;; [I"d = []
;TI"a = [:a0, :a1, :a2, :a3]
;TI"b = [:b0, :b1, :b2, :b3]
;TI"c = [:c0, :c1, :c2, :c3]
;TI"Ca.zip(b, c) {|sub_array| d.push(sub_array.reverse) } # => nil
;TI"
pp d
;TI"
# =>
;TI"[[:c0, :b0, :a0],
;TI" [:c1, :b1, :a1],
;TI" [:c2, :b2, :a2],
;TI" [:c3, :b3, :a3]]
;T;
0o;
; [I"FFor an *object* in *other_arrays* that is not actually an array, ;TI"Hforms the the "other array" as object.to_ary, if defined, ;TI"/or as object.each.to_a otherwise.;T@o;
; [I"RRelated: see {Methods for Converting}[rdoc-ref:Array@Methods+for+Converting].;T:
@fileI"array.c;T:0@omit_headings_from_table_of_contents_below0I"Rzip(*other_arrays) -> new_array
zip(*other_arrays) {|sub_array| ... } -> nil
;T0[ I"(*args);T@FI"
Array;TcRDoc::NormalClass00