ruby-changes:14156
From: usa <ko1@a...>
Date: Wed, 2 Dec 2009 11:22:32 +0900 (JST)
Subject: [ruby-changes:14156] Ruby:r25973 (ruby_1_8): * time.c (time_asctime): workaround for MSVCRT's bug.
usa 2009-12-02 11:22:19 +0900 (Wed, 02 Dec 2009) New Revision: 25973 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25973 Log: * time.c (time_asctime): workaround for MSVCRT's bug. backported from trunk (r18871). ref [ruby-core:26992] Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/time.c Index: ruby_1_8/time.c =================================================================== --- ruby_1_8/time.c (revision 25972) +++ ruby_1_8/time.c (revision 25973) @@ -1242,6 +1242,10 @@ } s = asctime(&tobj->tm); if (s[24] == '\n') s[24] = '\0'; +#if (defined(_MSC_VER) && defined(_DLL)) || defined(__MSVCRT__) + /* workaround for MSVCRT's bug */ + if (s[8] == '0') s[8] = ' '; +#endif return rb_str_new2(s); } Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 25972) +++ ruby_1_8/ChangeLog (revision 25973) @@ -1,3 +1,8 @@ +Wed Dec 2 11:21:10 2009 NAKAMURA Usaku <usa@r...> + + * time.c (time_asctime): workaround for MSVCRT's bug. + backported from trunk (r18871). ref [ruby-core:26992] + Tue Dec 1 18:00:12 2009 NAKAMURA, Hiroshi <nahi@r...> * test/digest/test_digest_extend.rb: added tests for digest framework. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/