[Ruby 1.9 - Bug #282] (Open) failure of test_asctime(TestTime) on mswin32

e$B%A%1%C%He(B #282 e$B$,Js9p$5$l$^$7$?!#e(B (by Usaku NAKAMURA)


Bug #282: failure of test_asctime(TestTime) on mswin32
http://redmine.ruby-lang.org/issues/show/282

e$B5/I<<Te(B: Usaku NAKAMURA
e$B%9%F!<%?%9e(B: Open
e$BM%@hEYe(B: Low
e$BC4Ev<Te(B: Usaku NAKAMURA
e$B%+%F%4%je(B:
Target version:

e$BI=Bj$NDL$j$G$9$,!"K:$l$J$$$h$&$K5-O?$K;D$7$F$*$-$^$9!#e(B

test_asctime(TestTime) [(snip)/test/ruby/test_time.rb:291]:
<“Sat Jan 1 00:00:00 2000”> expected but was
<“Sat Jan 01 00:00:00 2000”>.

C90e$B$rFI$`8B$j$OF|IU$NItJ,$O7nL>ItJ,$KB3$1$Fe(B “%3d”
e$B$J$N$G!"e(BMSVCRTe$B$N%P%0$G$9!#e(B
e$B$7$+$7$o$6$o$6BP:v$9$Y$-$+$I$&$+$OHyL/!#e(B

e$B%o%J%Y$H?=$7$^$9!#e(B

2008/07/17 6:59 Usaku NAKAMURA [email protected]:

test_asctime(TestTime) [(snip)/test/ruby/test_time.rb:291]:
<“Sat Jan 1 00:00:00 2000”> expected but was
<“Sat Jan 01 00:00:00 2000”>.

C90e$B$rFI$`8B$j$OF|IU$NItJ,$O7nL>ItJ,$KB3$1$Fe(B “%3d” e$B$J$N$G!"e(BMSVCRTe$B$N%P%0$G$9!#e(B
e$B$7$+$7$o$6$o$6BP:v$9$Y$-$+$I$&$+$OHyL/!#e(B

e$BC1=c$K$3$s$JIw$KBP1~$7$F$7$^$&$N$OBLL$J$N$G$7$g$&$+!#e(B
e$B%F%9%H$,Kh2s<:[email protected]$+5$$K$J$j$^$9!#e(B

Index: time.c

— time.c (revision 18359)
+++ time.c (working copy)
@@ -1339,6 +1339,9 @@
}
s = asctime(&tobj->tm);
if (s[24] == ‘\n’) s[24] = ‘\0’;
+#ifdef _WIN32

  • if (s[7] == ’ ’ && s[8] == ‘0’) s[8] = ’ ';
    +#endif

    return rb_str_new2(s);
    }

e$BLZB<$G$9!#e(B

wanabe e$B$5$s$O=q$-$^$7$?e(B:

2008/07/17 6:59 Usaku NAKAMURA [email protected]:

@@ -1339,6 +1339,9 @@
}
s = asctime(&tobj->tm);
if (s[24] == ‘\n’) s[24] = ‘\0’;
+#ifdef _WIN32

  • if (s[7] == ’ ’ && s[8] == ‘0’) s[8] = ’ ';
    +#endif

e$B!&e(B_WIN32e$B$H$$$&%7%s%%k$OBP>]$,9-$9$.e(B(MSVCRTe$B$r;H$o$J$$$b$N$b4^$`e(B)
e$B!&e(BMSVCRTe$B$N%P%0$KBP$9$ke(B workaround
e$B$H$$$&[email protected]$K$9$Y$-e(B

e$B$H;W$$$^$9!#e(B
e$B8e<T$O%3%a%s%H$r$D$1$k$J$j!"$$$+$K$b$H$$$&L>A0$GH=Dj$9$k$J$j!#e(B

e$B$H$3$m$G!“e(Bruby-core e$B$Ge(B
bcc32e$B$N%a%s%F%J$N7o$G<ALd$,$”$C$?$_$?$$$G$9$1$Ie(B
e$B$I$J$?$+JV;v$5$l$F$k$N$G$7$g$&$+e(B?

e$BLZB<$G$9!#e(B

wanabe e$B$5$s$O=q$-$^$7$?e(B (2008/08/13 22:27):

#if defined(MSVCRT) || defined(_MSC_VER)
e$B$H$$$&<0$r9M$($?$N$G$9$,!"$o$+$j$d$9$$!J8e<T$rK~$?$7$F$$$k!K$H$O;W$($^$;$s!#e(B
e$B2?$+$[$+$NDj?t$de(B configure e$B$N7k2L$J$I$r;H$C$F$&$^$/$G$-$J$$$b$N$G$7$g$&$+!#e(B

MSVCRT e$B$G%=!<%9$r8!:w$7$F8+$D$1$?$N$G$9$,e(B(win32.c)e$B!"e(B

#if (defined _MT || defined MSVCRT) && !defined BORLANDC
#define MSVCRT_THREADS
#endif

e$B$3$N%Q%?!<%s$HF1MM$Ke(B config.h e$B$"$?$j$Ge(B

#define AVOID_MSVCRT_BUG

e$B$H$$$&Dj5A$r$7$F$7$^$&$H$+!#e(B

config.h e$B$r:n$k$H$-$K$$$m$$$m$[$+$K$b>.$5$J%W%m%0%i%`$r:n$j$J$,$ie(B
e$B8!::$7$F$$$^$9$N$G!"$3$NLdBj$N%A%’%C%/$N$?$a$N%9%F%C%W$rF~$l$F$be(B
e$B$$$$$H;W$$$^$9$,$I$&$G$7$g$&$+e(B(e$B$d$k>l9g$NOC$H$7$Fe(B)e$B!#e(B

e$B$G$be(B
#if defined(MSVCRT) || defined(_MSC_VER)
e$B$GH=Dj$7$F$$$$F!"$-$A$s$H%3%a%s%H$r$D$1$F$$/[email protected]$1$G$$$$$H$$$&5$$b$7$^$9!#e(B

e$B$H$3$m$GLdBj$K$J$C$F$$$k$3$N5sF0$O!"e(Bmsvcr[789].dll
e$B$G$bF1MM$J$s$G$7$g$&$+e(B?

e$B%o%J%Y$G$9!#e(B

2008/08/12 20:56 e$BLZB<[email protected](B [email protected]:

e$B!&e(B_WIN32e$B$H$$$&%7%s%%k$OBP>]$,9-$9$.e(B(MSVCRTe$B$r;H$o$J$$$b$N$b4^$`e(B)
e$B!&e(BMSVCRTe$B$N%P%0$KBP$9$ke(B workaround e$B$H$$$&[email protected]$K$9$Y$-e(B

e$B$H;W$$$^$9!#e(B
e$B8e<T$O%3%a%s%H$r$D$1$k$J$j!"$$$+$K$b$H$$$&L>A0$GH=Dj$9$k$J$j!#e(B

e$B$J$k$[$I!#$=$&$7$^$9$H$I$&$9$k$N$,$$$$$N$G$7$g$&!#e(B
#if defined(MSVCRT) || defined(_MSC_VER)
e$B$H$$$&<0$r9M$($?$N$G$9$,!"$o$+$j$d$9$$!J8e<T$rK~$?$7$F$$$k!K$H$O;W$($^$;$s!#e(B
e$B2?$+$[$+$NDj?t$de(B configure
e$B$N7k2L$J$I$r;H$C$F$&$^$/$G$-$J$$$b$N$G$7$g$&$+!#e(B

e$B%A%1%C%He(B #282 e$B$,99?7$5$l$^$7$?!#e(B (by Usaku NAKAMURA)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

Applied in changeset r18871.

http://redmine.ruby-lang.org/issues/show/282

e$B$3$s$K$A$O!"$J$+$`$ie(B(e$B$&e(B)e$B$G$9!#e(B

e$B$J$<$+H?1~$,CY$/$J$C$F$7$^$$$^$7$?$,!"e(B

In message “[ruby-dev:35849] Re: [Ruby 1.9 - Bug #282] (Open) failure of
test_asctime(TestTime) on mswin32”
on Aug.14,2008 01:43:49, [email protected] wrote:

config.h e$B$r:n$k$H$-$K$$$m$$$m$[$+$K$b>.$5$J%W%m%0%i%`$r:n$j$J$,$ie(B
e$B8!::$7$F$$$^$9$N$G!"$3$NLdBj$N%A%’%C%/$N$?$a$N%9%F%C%W$rF~$l$F$be(B
e$B$$$$$H;W$$$^$9$,$I$&$G$7$g$&$+e(B(e$B$d$k>l9g$NOC$H$7$Fe(B)e$B!#e(B

e$B$3$3$^$G$d$k$[$I$N$3$H$+$J$"!"$H;W$C$?$N$G!"e(B

e$B$G$be(B
#if defined(MSVCRT) || defined(_MSC_VER)
e$B$GH=Dj$7$F$$$$F!"$-$A$s$H%3%a%s%H$r$D$1$F$$/[email protected]$1$G$$$$$H$$$&5$$b$7$^$9!#e(B

e$B$=$NDxEY$G$*Cc$rBy$7$Fe(Bcommite$B$7$^$7$?!#e(B
e$B$*Fs?M$H$b$$$m$$$m$"$j$,$H$&$4$6$$$^$7$?!#e(B

e$B$H$3$m$GLdBj$K$J$C$F$$$k$3$N5sF0$O!"e(Bmsvcr[789].dll e$B$G$bF1MM$J$s$G$7$g$&$+e(B?

e$BA4ItF1$8$G$9!#e(B

e$B$=$l$G$O!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs