rational numeric รข -1, 0, +1 or nil
Instance Public methods
Performs comparison and returns -1, 0, or +1.
nil
is returned if the two values are incomparable.
Rational(2, 3) <=> Rational(2, 3) #=> 0 Rational(5) <=> 5 #=> 0 Rational(2,3) <=> Rational(1,3) #=> 1 Rational(1,3) <=> 1 #=> -1 Rational(1,3) <=> 0.3 #=> 1
Please login to continue.