U:RDoc::AnyMethod[iI"<=>:ETI"Array#<=>;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"OComparison --- Returns an integer (+-1+, +0+, or +1) if this ;TI"?array is less than, equal to, or greater than +other_ary+.;To:RDoc::Markup::BlankLineo; ; [I"DEach object in each array is compared (using the <=> operator).;T@o; ; [ I"QArrays are compared in an "element-wise" manner; the first element of +ary+ ;TI"Pis compared with the first one of +other_ary+ using the <=> operator, then ;TI")each of the second elements, etc... ;TI"LAs soon as the result of any such comparison is non zero (i.e. the two ;TI"Lcorresponding elements are not equal), that result is returned for the ;TI"whole array comparison.;T@o; ; [ I"PIf all the elements are equal, then the result is based on a comparison of ;TI"Pthe array lengths. Thus, two arrays are "equal" according to Array#<=> if, ;TI"Mand only if, they have the same length and the value of each element is ;TI"Hequal to the value of the corresponding element in the other array.;T@o; ; [I"O+nil+ is returned if the +other_ary+ is not an array or if the comparison ;TI"$of two elements returned +nil+.;T@o:RDoc::Markup::Verbatim; [I"9[ "a", "a", "c" ] <=> [ "a", "b", "c" ] #=> -1 ;TI"9[ 1, 2, 3, 4, 5, 6 ] <=> [ 1, 2 ] #=> +1 ;TI"9[ 1, 2 ] <=> [ 1, :two ] #=> nil;T: @format0: @fileI" array.c;T:0@omit_headings_from_table_of_contents_below0I".ary <=> other_ary -> -1, 0, +1 or nil ;T0[I" (p1);T@*FI" Array;TcRDoc::NormalClass00