⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
2.7.0
/
system
/
Array
/
Edit File: %3c%3d%3e-i.ri
U:RDoc::AnyMethod[iI"<=>:ETI"Array#<=>;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"OComparison --- Returns an integer (+-1+, +0+, or <code>+1</code>) if this ;TI"?array is less than, equal to, or greater than +other_ary+.;To:RDoc::Markup::BlankLine o; ; [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
Simpan