diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-26 13:47:17 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-26 13:47:17 +0000 |
commit | 8039100c0abc8b1c71445839ff42f2798f399ac2 (patch) | |
tree | ec52fd6ecfa060aa0dfea7f399cfe6857fb88d38 /time.c | |
parent | 19ab08653eb18b18507a9c4de09327c904387d7f (diff) | |
download | ruby-8039100c0abc8b1c71445839ff42f2798f399ac2.tar.gz |
* 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
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1367,6 +1367,10 @@ time_asctime(VALUE time) } 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); } |