summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/numeric.c b/numeric.c
index fc05c9963c..f2c8c13a97 100644
--- a/numeric.c
+++ b/numeric.c
@@ -3198,6 +3198,38 @@ fix_even_p(VALUE num)
return Qtrue;
}
+/*
+ * Document-class: ZeroDivisionError
+ *
+ * Raised when attempting to divide an integer by 0.
+ *
+ * 42 / 0
+ *
+ * <em>raises the exception:</em>
+ *
+ * ZeroDivisionError: divided by 0
+ *
+ * Note that only division by an exact 0 will raise that exception:
+ *
+ * 42 / 0.0 # => Float::INFINITY
+ * 42 / -0.0 # => -Float::INFINITY
+ * 0 / 0.0 # => NaN
+ */
+
+/*
+ * 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_r
+ *
+ * <em>raises the exception:</em>
+ *
+ * FloatDomainError: Infinity
+ */
+
void
Init_Numeric(void)
{