diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-22 01:05:52 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-22 01:05:52 +0000 |
commit | b441a68e7fad7c5f0d3556aba15deea970aed8a5 (patch) | |
tree | 284ce059a0cb0c093ff66a9f8cb3781e2b9d5f87 /numeric.c | |
parent | 730e44efc868ee7860d46e8933ec8e59ae16d950 (diff) |
* numeric.c (fix_pow): 0**2 should not raise floating point
exception. [ruby-dev:31216]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2200,6 +2200,7 @@ fix_pow(x, y) if (b == 0) return INT2FIX(1); if (b == 1) return x; a = FIX2LONG(x); + if (a == 0) return INT2FIX(0); if (b > 0) { return rb_big_pow(rb_int2big(a), y); } |