ruby-changes:18282
From: yugui <ko1@a...>
Date: Thu, 23 Dec 2010 19:49:14 +0900 (JST)
Subject: [ruby-changes:18282] Ruby:r30305 (ruby_1_9_2): merges r29970 from trunk into ruby_1_9_2.
yugui 2010-12-23 19:48:56 +0900 (Thu, 23 Dec 2010) New Revision: 30305 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30305 Log: merges r29970 from trunk into ruby_1_9_2. -- test/ruby/test_transcode.rb (test_unicode_public_review_issue_121): - Removed commented-out options that are no longer under discussion. - Added two more tests for forthcomming clarifications. Modified files: branches/ruby_1_9_2/ChangeLog branches/ruby_1_9_2/test/ruby/test_transcode.rb branches/ruby_1_9_2/version.h Index: ruby_1_9_2/ChangeLog =================================================================== --- ruby_1_9_2/ChangeLog (revision 30304) +++ ruby_1_9_2/ChangeLog (revision 30305) @@ -1,3 +1,9 @@ +Mon Nov 29 18:31:31 2010 Martin Duerst <duerst@i...> + + * test/ruby/test_transcode.rb (test_unicode_public_review_issue_121): + - Removed commented-out options that are no longer under discussion. + - Added two more tests for forthcomming clarifications. + Mon Nov 29 05:54:22 2010 Koichi Sasada <ko1@a...> * thread_pthread.c (native_cond_*): Check return code. Index: ruby_1_9_2/version.h =================================================================== --- ruby_1_9_2/version.h (revision 30304) +++ ruby_1_9_2/version.h (revision 30305) @@ -1,13 +1,13 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 110 +#define RUBY_PATCHLEVEL 111 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 #define RUBY_RELEASE_YEAR 2010 #define RUBY_RELEASE_MONTH 12 -#define RUBY_RELEASE_DAY 20 -#define RUBY_RELEASE_DATE "2010-12-20" +#define RUBY_RELEASE_DAY 23 +#define RUBY_RELEASE_DATE "2010-12-23" #include "ruby/version.h" Index: ruby_1_9_2/test/ruby/test_transcode.rb =================================================================== --- ruby_1_9_2/test/ruby/test_transcode.rb (revision 30304) +++ ruby_1_9_2/test/ruby/test_transcode.rb (revision 30305) @@ -1389,14 +1389,16 @@ end def test_unicode_public_review_issue_121 # see http://www.unicode.org/review/pr-121.html - # assert_equal("\x00\x61\xFF\xFD\x00\x62".force_encoding('UTF-16BE'), - # "\x61\xF1\x80\x80\xE1\x80\xC2\x62".encode('UTF-16BE', 'UTF-8', invalid: :replace)) # option 1 assert_equal("\x00\x61\xFF\xFD\xFF\xFD\xFF\xFD\x00\x62".force_encoding('UTF-16BE'), "\x61\xF1\x80\x80\xE1\x80\xC2\x62".encode('UTF-16BE', 'UTF-8', invalid: :replace)) # option 2 assert_equal("\x61\x00\xFD\xFF\xFD\xFF\xFD\xFF\x62\x00".force_encoding('UTF-16LE'), "\x61\xF1\x80\x80\xE1\x80\xC2\x62".encode('UTF-16LE', 'UTF-8', invalid: :replace)) # option 2 - # assert_equal("\x00\x61\xFF\xFD\xFF\xFD\xFF\xFD\xFF\xFD\xFF\xFD\xFF\xFD\x00\x62".force_encoding('UTF-16BE'), - # "\x61\xF1\x80\x80\xE1\x80\xC2\x62".encode('UTF-16BE', 'UTF-8', invalid: :replace)) # option 3 + + # additional clarification + assert_equal("\xFF\xFD\xFF\xFD\xFF\xFD\xFF\xFD".force_encoding('UTF-16BE'), + "\xF0\x80\x80\x80".encode('UTF-16BE', 'UTF-8', invalid: :replace)) + assert_equal("\xFD\xFF\xFD\xFF\xFD\xFF\xFD\xFF".force_encoding('UTF-16LE'), + "\xF0\x80\x80\x80".encode('UTF-16LE', 'UTF-8', invalid: :replace)) end def test_yen_sign -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/