diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-31 00:13:21 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-31 00:13:21 +0000 |
commit | a6cafde27804d0a935212ca8921408ebc35861a6 (patch) | |
tree | 04b6f8f2a094905e630f670e3fb68758d1c6e610 /numeric.c | |
parent | d71702168ca57315179441bce49402295b28240c (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
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |