Strftime

e$B$U$J$P$G$9!#e(B

e$B<ALd$G$9$,!"$$$D$+$i$+!“e(BTime#strftime
e$B$K4^$^$l$k%J%k$,>C$($F$7$^$&$h$&e(B
e$B$K$J$C$?$_$?$$$G$9$,!”$3$l$O2?8N$G$7$g$&$+!#e(B

$ ruby16 -v -e ‘s=Time.now.strftime("%a\000%a"); p [s, s.size]’
ruby 1.6.8 (2002-12-24) [i386-freebsd5.4]
[“Sun\000Sun”, 7]

$ ruby -v -e ‘s=Time.now.strftime("%a\000%a"); p [s, s.size]’
ruby 1.8.5 (2006-08-25) [i386-freebsd5.4]
[“SunSun”, 6]

e$B$J$+$@$G$9!#e(B

06/09/03 e$B$Ke(B Tadayoshi F.[email protected]
e$B$5$s$O=q$-$^$7$?e(B:

e$B<ALd$G$9$,!"$$$D$+$i$+!“e(BTime#strftime e$B$K4^$^$l$k%J%k$,>C$($F$7$^$&$h$&e(B
e$B$K$J$C$?$_$?$$$G$9$,!”$3$l$O2?8N$G$7$g$&$+!#e(B

e$B$9$$$^$;$s!"%P%0$G$9!#e(B

Index: time.c

RCS file: /home/K8052/cvs/ruby/time.c,v
retrieving revision 1.90.2.21
diff -U 2 -r1.90.2.21 time.c
— time.c 27 Jul 2006 13:23:18 -0000 1.90.2.21
+++ time.c 4 Sep 2006 00:57:52 -0000
@@ -1861,5 +1861,5 @@
len = rb_strftime(&buf, p, &tobj->tm);
rb_str_cat(str, buf, len);

  •   p += strlen(p) + 1;
    
  •   p += strlen(p);
      if (buf != buffer) {
      free(buf);
    

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:29452] Re: strftime”
on Mon, 4 Sep 2006 11:28:19 +0900, “Nobuyoshi N.”
[email protected] writes:

|06/09/03 e$B$Ke(B Tadayoshi F.[email protected] e$B$5$s$O=q$-$^$7$?e(B:
|> e$B<ALd$G$9$,!“$$$D$+$i$+!“e(BTime#strftime e$B$K4^$^$l$k%J%k$,>C$($F$7$^$&$h$&e(B
|> e$B$K$J$C$?$_$?$$$G$9$,!”$3$l$O2?8N$G$7$g$&$+!#e(B
|
|e$B$9$$$^$;$s!”%P%0$G$9!#e(B

e$B%3%_%C%H$7$F$/$@$5$$!#e(B