diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-15 20:00:28 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-15 20:00:28 +0000 |
commit | db9f4b559d0bbc1d5317c03ad31070ad607cf5ca (patch) | |
tree | 9c8e1ebd2d5758b860763f021b9c64935e3658ed | |
parent | 6c80040ef41db245fa442ad6e7e7b4d1215ce5d7 (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_5@12984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | numeric.c | 1 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Thu Aug 16 05:00:01 2007 Yukihiro Matsumoto <matz@ruby-lang.org> + + * numeric.c (fix_pow): 0**2 should not raise floating point + exception. [ruby-dev:31216] + Thu Aug 16 04:56:35 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * win32/win32.c (CreateChild): enclose command line except for @@ -2202,6 +2202,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); } @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2007-08-16" #define RUBY_VERSION_CODE 185 #define RUBY_RELEASE_CODE 20070816 -#define RUBY_PATCHLEVEL 70 +#define RUBY_PATCHLEVEL 71 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 |