diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | numeric.c | 1 |
2 files changed, 6 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Sat Jul 14 02:51:52 2007 Yukihiro Matsumoto <matz@ruby-lang.org> + + * numeric.c (fix_pow): 0**2 should not raise floating point + exception. [ruby-dev:31216] + Sat Jul 14 02:25:48 2007 Yukihiro Matsumoto <matz@ruby-lang.org> * numeric.c (int_pow): wrong overflow detection. [ruby-dev:31213] @@ -2241,6 +2241,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 int_pow(a, b); } |