ÿØÿà 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"values_at:ETI"Array#values_at;TF:publico:RDoc::Markup::Document:@parts["o:RDoc::Markup::Paragraph; [I"IReturns elements from +self+ in a new array; does not modify +self+.;To:RDoc::Markup::BlankLine o;
; [I"KThe objects included in the returned array are the elements of +self+ ;TI")selected by the given +specifiers+, ;TI"6each of which must be a numeric index or a Range.;T@o;
; [I"In brief:;T@o:RDoc::Markup::Verbatim; [I"a = ['a', 'b', 'c', 'd']
;TI"
;TI"# Index specifiers.
;TI"Ia.values_at(2, 0, 2, 0) # => ["c", "a", "c", "a"] # May repeat.
;TI"[a.values_at(-4, -3, -2, -1) # => ["a", "b", "c", "d"] # Counts backwards if negative.
;TI"Na.values_at(-50, 50) # => [nil, nil] # Outside of self.
;TI"
;TI"# Range specifiers.
;TI"Sa.values_at(1..3) # => ["b", "c", "d"] # From range.begin to range.end.
;TI"Ba.values_at(1...3) # => ["b", "c"] # End excluded.
;TI"Fa.values_at(3..1) # => [] # No such elements.
;TI"
;TI"[a.values_at(-3..3) # => ["b", "c", "d"] # Negative range.begin counts backwards.
;TI"Ga.values_at(-50..3) # Raises RangeError.
;TI"
;TI"Ya.values_at(1..-2) # => ["b", "c"] # Negative range.end counts backwards.
;TI"Fa.values_at(1..-50) # => [] # No such elements.
;TI"
;TI"# Mixture of specifiers.
;TI"Ga.values_at(2..3, 3, 0..1, 0) # => ["c", "d", "d", "a", "b", "a"]
;T:@format0o;
; [I";With no +specifiers+ given, returns a new empty array:;T@o;; [I"a = ['a', 'b', 'c', 'd']
;TI"a.values_at # => []
;T;
0o;
; [I"=For each numeric specifier +index+, includes an element:;T@o:RDoc::Markup::List:
@type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o;
; [I"fFor each non-negative numeric specifier +index+ that is in-range (less than self.size), ;TI",includes the element at offset +index+:;T@o;; [I"+a.values_at(0, 2) # => ["a", "c"]
;TI"+a.values_at(0.1, 2.9) # => ["a", "c"]
;T;
0o;;0; [o;
; [I"iFor each negative numeric +index+ that is in-range (greater than or equal to - self.size), ;TI"-counts backwards from the end of +self+:;T@o;; [I")a.values_at(-1, -4) # => ["d", "a"]
;T;
0o;
; [I";The given indexes may be in any order, and may repeat:;T@o;; [I"?a.values_at(2, 0, 1, 0, 2) # => ["c", "a", "b", "a", "c"]
;T;
0o;
; [I";For each +index+ that is out-of-range, includes +nil+:;T@o;; [I"(a.values_at(4, -5) # => [nil, nil]
;T;
0o;
; [I"9For each Range specifier +range+, includes elements ;TI">according to range.begin and range.end:;T@o;;;;[o;;0; [o;
; [
I"9If both range.begin and range.end ;TI"Care non-negative and in-range (less than self.size), ;TI"7includes elements from index range.begin ;TI"Fthrough range.end - 1 (if range.exclude_end?), ;TI"/or through range.end (otherwise):;T@o;; [I"(a.values_at(1..2) # => ["b", "c"]
;TI"#a.values_at(1...2) # => ["b"]
;T;
0o;;0; [o;
; [I"gIf range.begin is negative and in-range (greater than or equal to - self.size), ;TI"-counts backwards from the end of +self+:;T@o;; [I"(a.values_at(-2..3) # => ["c", "d"]
;T;
0o;;0; [o;
; [I"OIf range.begin is negative and out-of-range, raises an exception:;T@o;; [I"-a.values_at(-5..3) # Raises RangeError.
;T;
0o;;0; [o;
; [I"9If range.end is positive and out-of-range, ;TI"4extends the returned array with +nil+ elements:;T@o;; [I"6a.values_at(1..5) # => ["b", "c", "d", nil, nil]
;T;
0o;;0; [o;
; [I"5If range.end is negative and in-range, ;TI"-counts backwards from the end of +self+:;T@o;; [I"(a.values_at(1..-2) # => ["b", "c"]
;T;
0o;;0; [o;
; [I"9If range.end is negative and out-of-range, ;TI"returns an empty array:;T@o;; [I" a.values_at(1..-5) # => []
;T;
0o;
; [I"9The given ranges may be in any order and may repeat:;T@o;; [I"Ga.values_at(2..3, 0..1, 2..3) # => ["c", "d", "a", "b", "c", "d"]
;T;
0o;
; [I"CThe given specifiers may be any mixture of indexes and ranges:;T@o;; [I"Ga.values_at(3, 1..2, 0, 2..3) # => ["d", "b", "c", "a", "c", "d"]
;T;
0o;
; [I"NRelated: see {Methods for Fetching}[rdoc-ref:Array@Methods+for+Fetching].;T:
@fileI"array.c;T:0@omit_headings_from_table_of_contents_below0I")values_at(*specifiers) -> new_array
;T0[ I"(*args);T@FI"
Array;TcRDoc::NormalClass00