diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-27 16:01:54 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-27 16:01:54 +0000 |
| commit | a07efb300115c35155b397076ce5b95a52a4db8d (patch) | |
| tree | 2276bd860fd361dfb0ef2d22d12cf391040b484a /numeric.c | |
| parent | 0df3df6925b8c89ae8b000caabe9889ebc3e7804 (diff) | |
| download | ruby-a07efb300115c35155b397076ce5b95a52a4db8d.tar.gz ruby-a07efb300115c35155b397076ce5b95a52a4db8d.tar.xz ruby-a07efb300115c35155b397076ce5b95a52a4db8d.zip | |
* numeric.c (flodivmod): floating point division should raise
ZeroDivisionError as integer division. [incompatible]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
| -rw-r--r-- | numeric.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -678,6 +678,7 @@ flodivmod(double x, double y, double *divp, double *modp) { double div, mod; + if (y == 0.0) rb_num_zerodiv(); #ifdef HAVE_FMOD mod = fmod(x, y); #else |
