summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-31 00:13:21 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-31 00:13:21 +0000
commita6cafde27804d0a935212ca8921408ebc35861a6 (patch)
tree04b6f8f2a094905e630f670e3fb68758d1c6e610
parentd71702168ca57315179441bce49402295b28240c (diff)
merges r31805 from trunk into ruby_1_9_2.
-- * numeric.c (int_pow): make sure to assign the result of x * z. If xz is optimized out, the value won't overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@31843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--numeric.c2
-rw-r--r--version.h2
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d37a774fc0..c1c8c2f79c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon May 30 10:26:51 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * numeric.c (int_pow): make sure to assign the result of x * z.
+ If xz is optimized out, the value won't overflow.
+
Sun May 29 15:09:05 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* numeric.c (flo_round): fix for negative value.
diff --git a/numeric.c b/numeric.c
index 4a3efac844..203bef9c65 100644
--- a/numeric.c
+++ b/numeric.c
@@ -2573,7 +2573,7 @@ int_pow(long x, unsigned long y)
y >>= 1;
}
{
- long xz = x * z;
+ volatile long xz = x * z;
if (!POSFIXABLE(xz) || xz / x != z) {
goto bignum;
}
diff --git a/version.h b/version.h
index 821d93023e..db207afbde 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2"
-#define RUBY_PATCHLEVEL 260
+#define RUBY_PATCHLEVEL 261
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1