[前][次][番号順一覧][スレッド一覧]

ruby-changes:36011

From: usa <ko1@a...>
Date: Wed, 22 Oct 2014 20:03:31 +0900 (JST)
Subject: [ruby-changes:36011] usa:r48092 (trunk): * test/test_unicode_normalize.rb: set encoding when reading.

usa	2014-10-22 20:03:23 +0900 (Wed, 22 Oct 2014)

  New Revision: 48092

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48092

  Log:
    * test/test_unicode_normalize.rb: set encoding when reading.

  Modified files:
    trunk/test/test_unicode_normalize.rb
Index: test/test_unicode_normalize.rb
===================================================================
--- test/test_unicode_normalize.rb	(revision 48091)
+++ test/test_unicode_normalize.rb	(revision 48092)
@@ -10,7 +10,7 @@ class TestNormalize < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/test_unicode_normalize.rb#L10
   @@debug = false # if true, generation of explicit error messages is switched on
                   # false is about two times faster than true
   def read_tests
-    IO.readlines(File.expand_path('../enc/unicode/data/NormalizationTest.txt', __dir__))
+    IO.readlines(File.expand_path('../enc/unicode/data/NormalizationTest.txt', __dir__), encoding: 'utf-8')
     .collect.with_index { |linedata, linenumber| [linedata, linenumber]}
     .reject { |line| line[0] =~ /^[\#@]/ }
     .collect do |line|

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]