D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Array
/
Filename :
take-i.ri
back
Copy
U:RDoc::AnyMethod[iI" take:ETI"Array#take;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [ I"HReturns a new array containing the first +count+ element of +self+ ;TI"(as available); ;TI"-+count+ must be a non-negative numeric; ;TI"does not modify +self+:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [ I"a = ['a', 'b', 'c', 'd'] ;TI"!a.take(2) # => ["a", "b"] ;TI"!a.take(2.1) # => ["a", "b"] ;TI"+a.take(50) # => ["a", "b", "c", "d"] ;TI"a.take(0) # => [] ;T:@format0o; ; [I"NRelated: see {Methods for Fetching}[rdoc-ref:Array@Methods+for+Fetching].;T: @fileI"array.c;T:0@omit_headings_from_table_of_contents_below0I"take(count) -> new_array ;T0[ I" (p1);T@FI" Array;TcRDoc::NormalClass00