Should not refer Float class in case of MRB_WITHOUT_FLOAT.

This commit removes `Float` from `rational.c`.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2019-05-20 16:35:06 +09:00
parent 5d30309e98
commit b7f85b9df9
+2 -5
View File
@@ -48,12 +48,9 @@ class Rational < Numeric
end
def <=>(rhs)
case rhs
when Fixnum
if rhs.is_a?(Integral)
return numerator <=> rhs if denominator == 1
rhs = Rational(rhs)
when Float
return to_f <=> rhs
end
case rhs
@@ -103,5 +100,5 @@ end
end
__send__(original_operator_name, rhs)
end
end
end if Object.const_defined?(:Float)
end