U:RDoc::AnyMethod[iI" slice:ETI"Array#slice;TF: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HElement Reference --- Returns the element at +index+, or returns a ;TI"Hsubarray starting at the +start+ index and continuing for +length+ ;TI"Eelements, or returns a subarray specified by +range+ of indices.;To:RDoc::Markup::BlankLineo; ; [ I"ONegative indices count backward from the end of the array (-1 is the last ;TI"Pelement). For +start+ and +range+ cases the starting index is just before ;TI"Man element. Additionally, an empty array is returned when the starting ;TI";index for an element range is at the end of the array.;T@o; ; [I"EReturns +nil+ if the index (or starting index) are out of range.;T@o:RDoc::Markup::Verbatim; [I"%a = [ "a", "b", "c", "d", "e" ] ;TI"&a[2] + a[0] + a[1] #=> "cab" ;TI"$a[6] #=> nil ;TI"-a[1, 2] #=> [ "b", "c" ] ;TI"2a[1..3] #=> [ "b", "c", "d" ] ;TI"(a[4..7] #=> [ "e" ] ;TI"$a[6..10] #=> nil ;TI"2a[-3, 3] #=> [ "c", "d", "e" ] ;TI"# special cases ;TI"$a[5] #=> nil ;TI"$a[6, 1] #=> nil ;TI"#a[5, 1] #=> [] ;TI""a[5..10] #=> [];T: @format0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I"ƒary.slice(index) -> obj or nil ary.slice(start, length) -> new_ary or nil ary.slice(range) -> new_ary or nil;T0[I"(p1, p2 = v2);T@)FI" Array;TcRDoc::NormalClass00