diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-05 06:56:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-05 06:56:10 +0000 |
commit | 890d25d46f30b5557c2cc1d66333fa48bdf76918 (patch) | |
tree | ae91d5cc0cada687d82ec26e18dd706d08bae1cc /numeric.c | |
parent | 1e23f4950d520522443037eead113b1fe364c244 (diff) |
* numeric.c (int_pow): even number multiplication never be negative.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2209,7 +2209,7 @@ int_pow(x, y) z = xz; } } while (--y); - if (neg) z = -z; + if (neg && (y & 1)) z = -z; return LONG2NUM(z); } |