ruby-changes:9477
From: yugui <ko1@a...>
Date: Thu, 25 Dec 2008 18:54:18 +0900 (JST)
Subject: [ruby-changes:9477] Ruby:r21015 (ruby_1_9_1): merges r20944 from trunk into ruby_1_9_1.
yugui 2008-12-25 18:53:58 +0900 (Thu, 25 Dec 2008) New Revision: 21015 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21015 Log: merges r20944 from trunk into ruby_1_9_1. * strftime.c (rb_strftime): use locale insensitive functions for tr_TR locale. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/strftime.c branches/ruby_1_9_1/test/ruby/test_time.rb Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 21014) +++ ruby_1_9_1/ChangeLog (revision 21015) @@ -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: ruby_1_9_1/strftime.c =================================================================== --- ruby_1_9_1/strftime.c (revision 21014) +++ ruby_1_9_1/strftime.c (revision 21015) @@ -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: ruby_1_9_1/test/ruby/test_time.rb =================================================================== --- ruby_1_9_1/test/ruby/test_time.rb (revision 21014) +++ ruby_1_9_1/test/ruby/test_time.rb (revision 21015) @@ -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/