summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--numeric.c1
-rw-r--r--version.h2
3 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 62d55b2f55a..32803df727c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Aug 22 10:02:42 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * numeric.c (fix_pow): 0**2 should not raise floating point
+ exception. [ruby-dev:31216]
+
Wed Aug 22 10:01:08 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* win32/win32.c (CreateChild): enclose command line except for
diff --git a/numeric.c b/numeric.c
index 23d35a1cd5e..88711f1d55a 100644
--- a/numeric.c
+++ b/numeric.c
@@ -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);
}
diff --git a/version.h b/version.h
index facb4be120f..56e41b88346 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2007-08-22"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20070822
-#define RUBY_PATCHLEVEL 59
+#define RUBY_PATCHLEVEL 60
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8