ruby-changes:25099
From: usa <ko1@a...>
Date: Fri, 12 Oct 2012 13:38:54 +0900 (JST)
Subject: [ruby-changes:25099] usa:r37151 (ruby_1_9_3): merge revision(s) 35015:
usa 2012-10-12 13:38:43 +0900 (Fri, 12 Oct 2012) New Revision: 37151 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37151 Log: merge revision(s) 35015: * numeric.c (flodivmod): must through the same pass if HAVE_FMOD or not. this is a bugfix of r35013. Modified files: branches/ruby_1_9_3/ChangeLog branches/ruby_1_9_3/numeric.c branches/ruby_1_9_3/test/ruby/test_float.rb branches/ruby_1_9_3/version.h Index: ruby_1_9_3/ChangeLog =================================================================== --- ruby_1_9_3/ChangeLog (revision 37150) +++ ruby_1_9_3/ChangeLog (revision 37151) @@ -1,3 +1,8 @@ +Fri Oct 12 13:36:32 2012 NAKAMURA Usaku <usa@r...> + + * numeric.c (flodivmod): must through the same pass if HAVE_FMOD or not. + this is a bugfix of r35013. + Fri Oct 12 13:28:37 2012 NAKAMURA Usaku <usa@r...> * io.c (rb_cloexec_fcntl_dupfd): get rid of compile error on windows. Index: ruby_1_9_3/numeric.c =================================================================== --- ruby_1_9_3/numeric.c (revision 37150) +++ ruby_1_9_3/numeric.c (revision 37151) @@ -814,18 +814,18 @@ double div, mod; if (y == 0.0) rb_num_zerodiv(); -#ifdef HAVE_FMOD - mod = fmod(x, y); -#else if((x == 0.0) || (isinf(y) && !isinf(x))) mod = x; else { +#ifdef HAVE_FMOD + mod = fmod(x, y); +#else double z; modf(x/y, &z); mod = x - z * y; +#endif } -#endif if (isinf(x) && !isinf(y) && !isnan(y)) div = x; else Index: ruby_1_9_3/version.h =================================================================== --- ruby_1_9_3/version.h (revision 37150) +++ ruby_1_9_3/version.h (revision 37151) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.3" -#define RUBY_PATCHLEVEL 280 +#define RUBY_PATCHLEVEL 281 #define RUBY_RELEASE_DATE "2012-10-12" #define RUBY_RELEASE_YEAR 2012 Index: ruby_1_9_3/test/ruby/test_float.rb =================================================================== --- ruby_1_9_3/test/ruby/test_float.rb (revision 37150) +++ ruby_1_9_3/test/ruby/test_float.rb (revision 37151) @@ -196,7 +196,7 @@ end def test_modulo3 - bug6048 = '[ruby-core:42726]' + bug6044 = '[ruby-core:42726]' assert_equal(4.2, 4.2.send(:%, Float::INFINITY)) assert_equal(4.2, 4.2 % Float::INFINITY) assert_is_minus_zero(-0.0 % 4.2) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/