ruby-changes:19798
From: yugui <ko1@a...>
Date: Tue, 31 May 2011 09:13:32 +0900 (JST)
Subject: [ruby-changes:19798] yugui:r31843 (ruby_1_9_2): merges r31805 from trunk into ruby_1_9_2.
yugui 2011-05-31 09:13:21 +0900 (Tue, 31 May 2011) New Revision: 31843 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31843 Log: 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. Modified files: branches/ruby_1_9_2/ChangeLog branches/ruby_1_9_2/numeric.c branches/ruby_1_9_2/version.h Index: ruby_1_9_2/ChangeLog =================================================================== --- ruby_1_9_2/ChangeLog (revision 31842) +++ ruby_1_9_2/ChangeLog (revision 31843) @@ -1,3 +1,8 @@ +Mon May 30 10:26:51 2011 NARUSE, Yui <naruse@r...> + + * 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@r...> * numeric.c (flo_round): fix for negative value. Index: ruby_1_9_2/numeric.c =================================================================== --- ruby_1_9_2/numeric.c (revision 31842) +++ ruby_1_9_2/numeric.c (revision 31843) @@ -2573,7 +2573,7 @@ y >>= 1; } { - long xz = x * z; + volatile long xz = x * z; if (!POSFIXABLE(xz) || xz / x != z) { goto bignum; } Index: ruby_1_9_2/version.h =================================================================== --- ruby_1_9_2/version.h (revision 31842) +++ ruby_1_9_2/version.h (revision 31843) @@ -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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/