⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.116
Server IP:
78.40.11.138
Server:
Linux tango.o2switch.net 4.18.0-553.30.1.lve.el8.x86_64 #1 SMP Tue Dec 3 01:21:19 UTC 2024 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
opt
/
alt
/
ruby33
/
share
/
ri
/
system
/
Numeric
/
Edit File: coerce-i.ri
U:RDoc::AnyMethod[iI"coerce:ETI"Numeric#coerce;TF:privateo:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"@Returns a 2-element array containing two numeric elements, ;TI"6formed from the two operands +self+ and +other+, ;TI"!of a common compatible type.;To:RDoc::Markup::BlankLine o; ; [I"/Of the Core and Standard Library classes, ;TI"<Integer, Rational, and Complex use this implementation.;T@o; ; [I"Examples:;T@o:RDoc::Markup::Verbatim; [I"%i = 2 # => 2 ;TI"*i.coerce(3) # => [3, 2] ;TI".i.coerce(3.0) # => [3.0, 2.0] ;TI".i.coerce(Rational(1, 2)) # => [0.5, 2.0] ;TI"3i.coerce(Complex(3, 4)) # Raises RangeError. ;TI" ;TI")r = Rational(5, 2) # => (5/2) ;TI"2r.coerce(2) # => [(2/1), (5/2)] ;TI".r.coerce(2.0) # => [2.0, 2.5] ;TI"2r.coerce(Rational(2, 3)) # => [(2/3), (5/2)] ;TI"8r.coerce(Complex(3, 4)) # => [(3+4i), ((5/2)+0i)] ;TI" ;TI"*c = Complex(2, 3) # => (2+3i) ;TI"4c.coerce(2) # => [(2+0i), (2+3i)] ;TI"6c.coerce(2.0) # => [(2.0+0i), (2+3i)] ;TI"8c.coerce(Rational(1, 2)) # => [((1/2)+0i), (2+3i)] ;TI"4c.coerce(Complex(3, 4)) # => [(3+4i), (2+3i)] ;T:@format0o; ; [I"6Raises an exception if any type conversion fails.;T: @fileI"numeric.c;T:0@omit_headings_from_table_of_contents_below0I"coerce(other) -> array ;T0[ I" (p1);T@.FI"Numeric;TcRDoc::NormalClass00
Simpan