⚝
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 :
shift-i.ri
U:RDoc::AnyMethod[iI" shift:ETI"Array#shift;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"*Removes and returns leading elements.;To:RDoc::Markup::BlankLine o; ; [I"FWhen no argument is given, removes and returns the first element:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"a.shift # => :foo ;TI"a # => ['bar', 2] ;T:@format0o; ; [I"&Returns +nil+ if +self+ is empty.;T@o; ; [I"SWhen positive \Integer argument +n+ is given, removes the first +n+ elements; ;TI",returns those elements in a new \Array:;To;; [I"a = [:foo, 'bar', 2] ;TI"#a.shift(2) # => [:foo, 'bar'] ;TI"a # => [2] ;T; 0o; ; [I"@If +n+ is as large as or larger than
self.length
, ;TI"Bremoves all elements; returns those elements in a new \Array:;To;; [I"a = [:foo, 'bar', 2] ;TI"&a.shift(3) # => [:foo, 'bar', 2] ;T; 0o; ; [I"FIf +n+ is zero, returns a new empty \Array; +self+ is unmodified.;T@o; ; [I"$Related: #push, #pop, #unshift.;T: @fileI"array.c;T:0@omit_headings_from_table_of_contents_below0I">array.shift -> object or nil array.shift(n) -> new_array ;T0[ I"(*args);T@1FI" Array;TcRDoc::NormalClass00