Rational(x[, y]) â numeric
Instance Public methods
Returns x/y;
Rational(1, 2) #=> (1/2)
Rational('1/2') #=> (1/2)
Rational(nil) #=> TypeError
Rational(1, nil) #=> TypeError
Syntax of string form:
string form = extra spaces , rational , extra spaces ;
rational = [ sign ] , unsigned rational ;
unsigned rational = numerator | numerator , "/" , denominator ;
numerator = integer part | fractional part | integer part , fractional part ;
denominator = digits ;
integ