D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Array
/
Filename :
delete_at-i.ri
back
Copy
U:RDoc::AnyMethod[iI"delete_at:ETI"Array#delete_at;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"JRemoves the element of +self+ at the given +index+, which must be an ;TI"a{integer-convertible object}[rdoc-ref:implicit_conversion.rdoc@Integer-Convertible+Objects].;To:RDoc::Markup::BlankLine o; ; [I"IWhen +index+ is non-negative, deletes the element at offset +index+:;T@o:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"a.delete_at(1) # => "bar" ;TI"a # => [:foo, 2] ;T:@format0o; ; [I"IWhen +index+ is negative, counts backward from the end of the array:;T@o;; [I"a = [:foo, 'bar', 2] ;TI" a.delete_at(-2) # => "bar" ;TI"a # => [:foo, 2] ;T; 0o; ; [I"1When +index+ is out of range, returns +nil+.;T@o;; [I"a = [:foo, 'bar', 2] ;TI"a.delete_at(3) # => nil ;TI"a.delete_at(-4) # => nil ;T; 0o; ; [I"NRelated: see {Methods for Deleting}[rdoc-ref:Array@Methods+for+Deleting].;T: @fileI"array.c;T:0@omit_headings_from_table_of_contents_below0I"/delete_at(index) -> removed_object or nil ;T0[ I" (p1);T@+FI" Array;TcRDoc::NormalClass00