ruby-changes:45744
From: nobu <ko1@a...>
Date: Thu, 9 Mar 2017 11:10:32 +0900 (JST)
Subject: [ruby-changes:45744] nobu:r57817 (trunk): fix UTF-32 valid_encoding?
nobu 2017-03-09 11:10:27 +0900 (Thu, 09 Mar 2017) New Revision: 57817 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57817 Log: fix UTF-32 valid_encoding? * test/ruby/test_io_m17n.rb (TestIO_M17N#test_puts_widechar): do not use invalid codepoint. [ruby-core:79966] [Bug #13292] Modified files: trunk/test/ruby/test_io_m17n.rb Index: test/ruby/test_io_m17n.rb =================================================================== --- test/ruby/test_io_m17n.rb (revision 57816) +++ test/ruby/test_io_m17n.rb (revision 57817) @@ -2237,7 +2237,7 @@ EOT https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io_m17n.rb#L2237 w.binmode w.puts(0x010a.chr(Encoding::UTF_32BE)) w.puts(0x010a.chr(Encoding::UTF_16BE)) - w.puts(0x0a010000.chr(Encoding::UTF_32LE)) + w.puts(0x0a01.chr(Encoding::UTF_32LE)) w.puts(0x0a01.chr(Encoding::UTF_16LE)) w.close end, @@ -2245,7 +2245,7 @@ EOT https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io_m17n.rb#L2245 r.binmode assert_equal("\x00\x00\x01\x0a\n", r.read(5), bug) assert_equal("\x01\x0a\n", r.read(3), bug) - assert_equal("\x00\x00\x01\x0a\n", r.read(5), bug) + assert_equal("\x01\x0a\x00\x00\n", r.read(5), bug) assert_equal("\x01\x0a\n", r.read(3), bug) assert_equal("", r.read, bug) r.close -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/