HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/share/ri/3.0.0/system/Array/find_index-i.ri
U:RDoc::AnyMethod[iI"find_index:ETI"Array#find_index;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;	[I".Returns the index of a specified element.;To:RDoc::Markup::BlankLineo;
;	[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_below0I"xarray.index(object) -> integer or nil
array.index {|element| ... } -> integer or nil
array.index -> new_enumerator
;T0[[I"
index;T@	I"(*args);T@6FI"
Array;TcRDoc::NormalClass00