D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Numeric
/
Filename :
to_int-i.ri
back
Copy
U:RDoc::AnyMethod[iI"to_int:ETI"Numeric#to_int;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"#Returns +self+ as an integer; ;TI"7converts using method +to_i+ in the derived class.;To:RDoc::Markup::BlankLine o; ; [I"/Of the Core and Standard Library classes, ;TI"7only Rational and Complex use this implementation.;T@o; ; [I"Examples:;T@o:RDoc::Markup::Verbatim; [ I""Rational(1, 2).to_int # => 0 ;TI""Rational(2, 1).to_int # => 2 ;TI""Complex(2, 0).to_int # => 2 ;TI"HComplex(2, 1).to_int # Raises RangeError (non-zero imaginary part);T:@format0: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"to_int -> integer ;T0[ I"();T@FI"Numeric;TcRDoc::NormalClass00