ruby-changes:28113
From: akr <ko1@a...>
Date: Sun, 7 Apr 2013 01:02:57 +0900 (JST)
Subject: [ruby-changes:28113] akr:r40165 (trunk): * strftime.c (rb_strftime_with_timespec): Test yday range.
akr 2013-04-07 01:02:46 +0900 (Sun, 07 Apr 2013) New Revision: 40165 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40165 Log: * strftime.c (rb_strftime_with_timespec): Test yday range. [ruby-core:44088] [Bug #6247] reported by Ruby Submit. Modified files: trunk/ChangeLog trunk/strftime.c Index: ChangeLog =================================================================== --- ChangeLog (revision 40164) +++ ChangeLog (revision 40165) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Apr 7 01:01:26 2013 Tanaka Akira <akr@f...> + + * strftime.c (rb_strftime_with_timespec): Test yday range. + [ruby-core:44088] [Bug #6247] reported by Ruby Submit. + Sat Apr 6 23:46:54 2013 Naohisa Goto <ngotogenome@g...> * configure.in (AC_CHECK_HEADERS): atomic.h for Solaris atomic_ops. Index: strftime.c =================================================================== --- strftime.c (revision 40164) +++ strftime.c (revision 40165) @@ -363,7 +363,8 @@ rb_strftime_with_timespec(char *s, size_ https://github.com/ruby/ruby/blob/trunk/strftime.c#L363 continue; case 'j': /* day of the year, 001 - 366 */ - FMT('0', 3, "d", vtm->yday); + i = range(1, vtm->yday, 366); + FMT('0', 3, "d", (int)i); continue; case 'm': /* month, 01 - 12 */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/