ruby-changes:1680
From: ko1@a...
Date: 22 Aug 2007 10:06:21 +0900
Subject: [ruby-changes:1680] shyouhei - Ruby:r13170 (ruby_1_8_6): * numeric.c (fix_pow): 0**2 should not raise floating point
shyouhei 2007-08-22 10:05:52 +0900 (Wed, 22 Aug 2007)
New Revision: 13170
Modified files:
branches/ruby_1_8_6/ChangeLog
branches/ruby_1_8_6/numeric.c
branches/ruby_1_8_6/version.h
Log:
* numeric.c (fix_pow): 0**2 should not raise floating point
exception. [ruby-dev:31216]
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/ChangeLog?r1=13170&r2=13169
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/version.h?r1=13170&r2=13169
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/numeric.c?r1=13170&r2=13169
Index: ruby_1_8_6/numeric.c
===================================================================
--- ruby_1_8_6/numeric.c (revision 13169)
+++ ruby_1_8_6/numeric.c (revision 13170)
@@ -2200,6 +2200,7 @@
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);
}
Index: ruby_1_8_6/ChangeLog
===================================================================
--- ruby_1_8_6/ChangeLog (revision 13169)
+++ ruby_1_8_6/ChangeLog (revision 13170)
@@ -1,3 +1,8 @@
+Wed Aug 22 10:02:42 2007 Yukihiro Matsumoto <matz@r...>
+
+ * 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@r...>
* win32/win32.c (CreateChild): enclose command line except for
Index: ruby_1_8_6/version.h
===================================================================
--- ruby_1_8_6/version.h (revision 13169)
+++ ruby_1_8_6/version.h (revision 13170)
@@ -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
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml