⚝
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 :
index-i.ri
U:RDoc::AnyMethod[iI" index:ETI"Array#index;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I".Returns the index of a specified element.;To:RDoc::Markup::BlankLine o; ; [I"3When argument +object+ is given but no block, ;TI"6returns the index of the first element +element+ ;TI"*for which <tt>object == element</tt>:;To:RDoc::Markup::Verbatim; [I"!a = [:foo, 'bar', 2, 'bar'] ;TI"a.index('bar') # => 1 ;T:@format0o; ; [I",Returns +nil+ if no such element found.;T@o; ; [I"8When both argument +object+ and a block are given, ;TI"3calls the block with each successive element; ;TI"Wreturns the index of the first element for which the block returns a truthy value:;To;; [I"!a = [:foo, 'bar', 2, 'bar'] ;TI"2a.index {|element| element == 'bar' } # => 1 ;T; 0o; ; [I"=Returns +nil+ if the block never returns a truthy value.;T@o; ; [I"MWhen neither an argument nor a block is given, returns a new Enumerator:;To;; [ I"a = [:foo, 'bar', 2] ;TI"e = a.index ;TI"2e # => #<Enumerator: [:foo, "bar", 2]:index> ;TI"1e.each {|element| element == 'bar' } # => 1 ;T; 0o; ; [I"2Array#find_index is an alias for Array#index.;T@o; ; [I"Related: #rindex.;T: @fileI"array.c;T:0@omit_headings_from_table_of_contents_below000[ I"(*args);T@6FI" Array;TcRDoc::NormalClass0[@9FI"find_index;T