⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.13
Server IP:
109.199.105.153
Server:
Linux connect.inboxifs.com 5.15.0-152-generic #162-Ubuntu SMP Wed Jul 23 09:48:42 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
3.0.0
/
system
/
Array
/
View File Name :
sort%21-i.ri
U:RDoc::AnyMethod[iI" sort!:ETI"Array#sort!;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"6Returns +self+ with its elements sorted in place.;To:RDoc::Markup::BlankLine o; ; [I"BWith no block, compares elements using operator <tt><=></tt> ;TI"(see Comparable):;To:RDoc::Markup::Verbatim; [ I"#a = 'abcde'.split('').shuffle ;TI"&a # => ["e", "b", "d", "a", "c"] ;TI" a.sort! ;TI"&a # => ["a", "b", "c", "d", "e"] ;T:@format0o; ; [I";With a block, calls the block with each element pair; ;TI"Kfor each element pair +a+ and +b+, the block should return an integer:;To:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I"(Negative when +b+ is to follow +a+.;To;;0; [o; ; [I"*Zero when +a+ and +b+ are equivalent.;To;;0; [o; ; [I"(Positive when +a+ is to follow +b+.;T@o; ; [I" Example:;To;; [I"#a = 'abcde'.split('').shuffle ;TI"&a # => ["e", "b", "d", "a", "c"] ;TI"a.sort! {|a, b| a <=> b } ;TI"&a # => ["a", "b", "c", "d", "e"] ;TI"a.sort! {|a, b| b <=> a } ;TI"&a # => ["e", "d", "c", "b", "a"] ;T; 0o; ; [I"NWhen the block returns zero, the order for +a+ and +b+ is indeterminate, ;TI"and may be unstable:;To;; [ I"#a = 'abcde'.split('').shuffle ;TI"&a # => ["e", "b", "d", "a", "c"] ;TI"a.sort! {|a, b| 0 } ;TI"%a # => ["d", "e", "c", "a", "b"];T; 0: @fileI"array.c;T:0@omit_headings_from_table_of_contents_below0I";array.sort! -> self array.sort! {|a, b| ... } -> self ;T0[ I"();T@CFI" Array;TcRDoc::NormalClass00