diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-08 04:50:09 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-08 04:50:09 +0000 |
commit | 1dee5e34a3d397eb96db0b6bcc8e9cb9858975d0 (patch) | |
tree | 5822fdfead1635f2f78cfd0ee69bd61c217ad07f /numeric.c | |
parent | b140b77926a6e62228f1152157d0348ff5724f89 (diff) | |
download | ruby-1dee5e34a3d397eb96db0b6bcc8e9cb9858975d0.tar.gz |
* error.c: RDoc for subclasses of Exception. [ruby-core:28394]
* cont.c: ditto
* enumerator.c: ditto
* io.c: ditto
* math.c: ditto
* numeric.c: ditto
* proc.c: ditto
* re.c: ditto
* thread.c: ditto
* transcode.c: ditto. Thanks to Run Paint for some of the documentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -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) { |