ruby-changes:7352
From: usa <ko1@a...>
Date: Tue, 26 Aug 2008 22:47:36 +0900 (JST)
Subject: [ruby-changes:7352] Ruby:r18871 (trunk): * time.c (time_asctime): workaround for MSVCRT's bug.
usa 2008-08-26 22:47:17 +0900 (Tue, 26 Aug 2008) New Revision: 18871 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18871 Log: * time.c (time_asctime): workaround for MSVCRT's bug. based on a patch from wanabe <s.wanabe AT gmail.com> at [ruby-dev:35831] and a suggestion by KIMURA Koichi <kbk AT kt.rim.or.jp> at [ruby-dev:35832] fixed [ruby-dev:35555] Modified files: trunk/ChangeLog trunk/time.c Index: time.c =================================================================== --- time.c (revision 18870) +++ time.c (revision 18871) @@ -1367,6 +1367,10 @@ } s = ASCTIME(&tobj->tm, buf); 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: ChangeLog =================================================================== --- ChangeLog (revision 18870) +++ ChangeLog (revision 18871) @@ -1,3 +1,11 @@ +Tue Aug 26 22:44:12 2008 NAKAMURA Usaku <usa@r...> + + * time.c (time_asctime): workaround for MSVCRT's bug. + based on a patch from wanabe <s.wanabe AT gmail.com> at + [ruby-dev:35831] and a suggestion by KIMURA Koichi + <kbk AT kt.rim.or.jp> at [ruby-dev:35832] + fixed [ruby-dev:35555] + Tue Aug 26 21:53:56 2008 Tanaka Akira <akr@f...> * transcode.c (rb_econv_open): disable newline conversion for ASCII -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/