HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/share/ri/3.0.0/system/Kernel/Rational-i.ri
U:RDoc::AnyMethod[iI"
Rational:ETI"Kernel#Rational;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;	[I"*Returns +x/y+ or +arg+ as a Rational.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;	[I" Rational(2, 3)   #=> (2/3)
;TI" Rational(5)      #=> (5/1)
;TI" Rational(0.5)    #=> (1/2)
;TI"?Rational(0.3)    #=> (5404319552844595/18014398509481984)
;TI"
;TI" Rational("2/3")  #=> (2/3)
;TI"!Rational("0.3")  #=> (3/10)
;TI"
;TI"-Rational("10 cents")  #=> ArgumentError
;TI")Rational(nil)         #=> TypeError
;TI")Rational(1, nil)      #=> TypeError
;TI"
;TI"5Rational("10 cents", exception: false)  #=> nil
;T:@format0o;
;	[I"Syntax of the string form:;T@o;;	[I"<string form = extra spaces , rational , extra spaces ;
;TI"/rational = [ sign ] , unsigned rational ;
;TI"Eunsigned rational = numerator | numerator , "/" , denominator ;
;TI"Snumerator = integer part | fractional part | integer part , fractional part ;
;TI"denominator = digits ;
;TI"integer part = digits ;
;TI"Nfractional part = "." , digits , [ ( "e" | "E" ) , [ sign ] , digits ] ;
;TI"sign = "-" | "+" ;
;TI"0digits = digit , { digit | "_" , digit } ;
;TI"Idigit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
;TI"extra spaces = ? \s* ? ;
;T;
0o;
;	[I"See also String#to_r.;T:
@fileI"rational.c;T:0@omit_headings_from_table_of_contents_below0I"oRational(x, y, exception: true)  ->  rational or nil
Rational(arg, exception: true)   ->  rational or nil
;T0[I"(p1, p2 = v2, p3 = {});T@1FI"Kernel;TcRDoc::NormalModule00