ruby-changes:16297
From: akr <ko1@a...>
Date: Fri, 11 Jun 2010 07:48:48 +0900 (JST)
Subject: [ruby-changes:16297] Ruby:r28269 (trunk, ruby_1_9_2): * time.c (find_time_t): test the result of LOCALTIME.
akr 2010-06-11 07:37:40 +0900 (Fri, 11 Jun 2010) New Revision: 28269 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28269 Log: * time.c (find_time_t): test the result of LOCALTIME. Modified files: branches/ruby_1_9_2/ChangeLog branches/ruby_1_9_2/time.c trunk/ChangeLog trunk/time.c Index: time.c =================================================================== --- time.c (revision 28268) +++ time.c (revision 28269) @@ -2870,7 +2870,7 @@ guess2 += 24 * 60 * 60; if (guess != guess2) { tm = LOCALTIME(&guess2, result); - if (tmcmp(tptr, tm) == 0) { + if (tm && tmcmp(tptr, tm) == 0) { if (guess < guess2) *tp = guess; else @@ -2895,7 +2895,7 @@ guess2 -= 24 * 60 * 60; if (guess != guess2) { tm = LOCALTIME(&guess2, result); - if (tmcmp(tptr, tm) == 0) { + if (tm && tmcmp(tptr, tm) == 0) { if (guess < guess2) *tp = guess2; else Index: ChangeLog =================================================================== --- ChangeLog (revision 28268) +++ ChangeLog (revision 28269) @@ -1,3 +1,7 @@ +Fri Jun 11 07:34:25 2010 Tanaka Akira <akr@f...> + + * time.c (find_time_t): test the result of LOCALTIME. + Fri Jun 11 00:42:45 2010 Tanaka Akira <akr@f...> * time.c (rb_localtime_r2): fix localtime overflow check. Index: ruby_1_9_2/time.c =================================================================== --- ruby_1_9_2/time.c (revision 28268) +++ ruby_1_9_2/time.c (revision 28269) @@ -2870,7 +2870,7 @@ guess2 += 24 * 60 * 60; if (guess != guess2) { tm = LOCALTIME(&guess2, result); - if (tmcmp(tptr, tm) == 0) { + if (tm && tmcmp(tptr, tm) == 0) { if (guess < guess2) *tp = guess; else @@ -2895,7 +2895,7 @@ guess2 -= 24 * 60 * 60; if (guess != guess2) { tm = LOCALTIME(&guess2, result); - if (tmcmp(tptr, tm) == 0) { + if (tm && tmcmp(tptr, tm) == 0) { if (guess < guess2) *tp = guess2; else Index: ruby_1_9_2/ChangeLog =================================================================== --- ruby_1_9_2/ChangeLog (revision 28268) +++ ruby_1_9_2/ChangeLog (revision 28269) @@ -1,3 +1,7 @@ +Fri Jun 11 07:34:25 2010 Tanaka Akira <akr@f...> + + * time.c (find_time_t): test the result of LOCALTIME. + Mon May 31 15:07:18 2010 NARUSE, Yui <naruse@r...> * file.c (file_expand_path): Refix r28102: this breaks -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/