diff --git a/src/numeric.c b/src/numeric.c index 2870f3787..4c50a51eb 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -795,6 +795,20 @@ flo_finite_p(mrb_state *mrb, mrb_value num) return mrb_bool_value(isfinite(mrb_float(num))); } +/* + * Document-class: FloatDomainError + * + * Raised when attempting to convert special float values + * (in particular infinite or NaN) + * to numerical classes which don't support them. + * + * Float::INFINITY.to_i + * + * raises the exception: + * + * FloatDomainError: Infinity + */ +/* ------------------------------------------------------------------------*/ void mrb_check_num_exact(mrb_state *mrb, mrb_float num) { @@ -1565,20 +1579,6 @@ int_to_f(mrb_state *mrb, mrb_value num) return mrb_float_value(mrb, (mrb_float)mrb_integer(num)); } -/* - * Document-class: FloatDomainError - * - * Raised when attempting to convert special float values - * (in particular infinite or NaN) - * to numerical classes which don't support them. - * - * Float::INFINITY.to_i - * - * raises the exception: - * - * FloatDomainError: Infinity - */ -/* ------------------------------------------------------------------------*/ MRB_API mrb_value mrb_float_to_integer(mrb_state *mrb, mrb_value x) {