* 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
19ab08653e
commit
8039100c0a
@ -1,3 +1,11 @@
|
|||||||
|
Tue Aug 26 22:44:12 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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@fsij.org>
|
Tue Aug 26 21:53:56 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* transcode.c (rb_econv_open): disable newline conversion for ASCII
|
* transcode.c (rb_econv_open): disable newline conversion for ASCII
|
||||||
|
4
time.c
4
time.c
@ -1367,6 +1367,10 @@ time_asctime(VALUE time)
|
|||||||
}
|
}
|
||||||
s = ASCTIME(&tobj->tm, buf);
|
s = ASCTIME(&tobj->tm, buf);
|
||||||
if (s[24] == '\n') s[24] = '\0';
|
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);
|
return rb_str_new2(s);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user