ruby-changes:9406
From: akr <ko1@a...>
Date: Tue, 23 Dec 2008 19:13:34 +0900 (JST)
Subject: [ruby-changes:9406] Ruby:r20944 (trunk): * strftime.c (rb_strftime): use locale insensitive functions for tr_TR
akr 2008-12-23 19:13:11 +0900 (Tue, 23 Dec 2008) New Revision: 20944 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20944 Log: * strftime.c (rb_strftime): use locale insensitive functions for tr_TR locale. Modified files: trunk/ChangeLog trunk/strftime.c trunk/test/ruby/test_time.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 20943) +++ ChangeLog (revision 20944) @@ -1,3 +1,8 @@ +Tue Dec 23 18:44:21 2008 Tanaka Akira <akr@f...> + + * strftime.c (rb_strftime): use locale insensitive functions for tr_TR + locale. + Tue Dec 23 17:38:03 2008 Tanaka Akira <akr@f...> * lib/test/unit/assertions.rb (assert_equal): show small differences Index: strftime.c =================================================================== --- strftime.c (revision 20943) +++ strftime.c (revision 20944) @@ -627,8 +627,8 @@ timeptr->tm_year + 1900L); if (w < 0) goto err; for (i = 3; i < 6; i++) - if (islower(s[i])) - s[i] = toupper(s[i]); + if (ISLOWER(s[i])) + s[i] = TOUPPER(s[i]); s += w; continue; #endif @@ -781,12 +781,12 @@ switch (flags & (BIT_OF(UPPER)|BIT_OF(LOWER))) { case BIT_OF(UPPER): do { - if (islower(*s)) *s = toupper(*s); + if (ISLOWER(*s)) *s = TOUPPER(*s); } while (s++, --i); break; case BIT_OF(LOWER): do { - if (isupper(*s)) *s = tolower(*s); + if (ISUPPER(*s)) *s = TOLOWER(*s); } while (s++, --i); break; default: Index: test/ruby/test_time.rb =================================================================== --- test/ruby/test_time.rb (revision 20943) +++ test/ruby/test_time.rb (revision 20944) @@ -468,5 +468,6 @@ assert_equal("JAN", T2000.strftime("%#b")) assert_equal("JANUARY", T2000.strftime("%#B")) assert_equal("JAN", T2000.strftime("%#h")) + assert_equal("FRIDAY", Time.local(2008,1,4).strftime("%#A")) end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/