D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Range
/
Filename :
first-i.ri
back
Copy
U:RDoc::AnyMethod[iI" first:ETI"Range#first;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"IWith no argument, returns the first element of +self+, if it exists:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"(1..4).first # => 1 ;TI"('a'..'d').first # => "a" ;T:@format0o; ; [I"3With non-negative integer argument +n+ given, ;TI"0returns the first +n+ elements in an array:;T@o;; [I"%(1..10).first(3) # => [1, 2, 3] ;TI"(1..10).first(0) # => [] ;TI"((1..4).first(50) # => [1, 2, 3, 4] ;T; 0o; ; [I"6Raises an exception if there is no first element:;T@o;; [I"$(..4).first # Raises RangeError;T; 0: @fileI"range.c;T:0@omit_headings_from_table_of_contents_below0I"'first -> object first(n) -> array ;T0[ I" (p1);T@"FI" Range;TcRDoc::NormalClass00