D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Float
/
Filename :
coerce-i.ri
back
Copy
U:RDoc::AnyMethod[iI"coerce:ETI"Float#coerce;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"HReturns a 2-element array containing +other+ converted to a \Float ;TI"and +self+:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [ I"(f = 3.14 # => 3.14 ;TI"/f.coerce(2) # => [2.0, 3.14] ;TI"/f.coerce(2.0) # => [2.0, 3.14] ;TI"/f.coerce(Rational(1, 2)) # => [0.5, 3.14] ;TI"/f.coerce(Complex(1, 0)) # => [1.0, 3.14] ;T:@format0o; ; [I"4Raises an exception if a type conversion fails.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"coerce(other) -> array ;T0[ I" (p1);T@FI" Float;TcRDoc::NormalClass00