⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
ri
/
3.0.0
/
system
/
Array
/
View File Name :
insert-i.ri
U:RDoc::AnyMethod[iI"insert:ETI"Array#insert;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"UInserts given +objects+ before or after the element at \Integer index +offset+; ;TI"returns +self+.;To:RDoc::Markup::BlankLine o; ; [I"?When +index+ is non-negative, inserts all given +objects+ ;TI"*before the element at offset +index+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"?a.insert(1, :bat, :bam) # => [:foo, :bat, :bam, "bar", 2] ;T:@format0o; ; [I"TExtends the array if +index+ is beyond the array (
index >= self.size
):;To;; [I"a = [:foo, 'bar', 2] ;TI"a.insert(5, :bat, :bam) ;TI"3a # => [:foo, "bar", 2, nil, nil, :bat, :bam] ;T; 0o; ; [I"&Does nothing if no objects given:;To;; [ I"a = [:foo, 'bar', 2] ;TI"a.insert(1) ;TI"a.insert(50) ;TI"a.insert(-50) ;TI"a # => [:foo, "bar", 2] ;T; 0o; ; [I";When +index+ is negative, inserts all given +objects+ ;TI"<_after_ the element at offset
index+self.size
:;To;; [I"a = [:foo, 'bar', 2] ;TI"a.insert(-2, :bat, :bam) ;TI"(a # => [:foo, "bar", :bat, :bam, 2];T; 0: @fileI"array.c;T:0@omit_headings_from_table_of_contents_below0I"+array.insert(index, *objects) -> self ;T0[ I"(*args);T@3FI" Array;TcRDoc::NormalClass00