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

ruby-changes:41682

From: naruse <ko1@a...>
Date: Sat, 6 Feb 2016 23:45:46 +0900 (JST)
Subject: [ruby-changes:41682] naruse:r53756 (trunk): Fix r53748; the datafile includes non ASCII

naruse	2016-02-06 23:45:49 +0900 (Sat, 06 Feb 2016)

  New Revision: 53756

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

  Log:
    Fix r53748; the datafile includes non ASCII

  Modified files:
    trunk/test/ruby/enc/test_regex_casefold.rb
Index: test/ruby/enc/test_regex_casefold.rb
===================================================================
--- test/ruby/enc/test_regex_casefold.rb	(revision 53755)
+++ test/ruby/enc/test_regex_casefold.rb	(revision 53756)
@@ -18,7 +18,7 @@ class TestCaseFold < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/ruby/enc/test_regex_casefold.rb#L18
   end
 
   def read_tests
-    IO.readlines(File.expand_path("../../../enc/unicode/data/#{UNICODE_VERSION}/CaseFolding.txt", __dir__))
+    IO.readlines(File.expand_path("../../../enc/unicode/data/#{UNICODE_VERSION}/CaseFolding.txt", __dir__), encoding: Encoding::ASCII_8BIT)
     .collect.with_index { |linedata, linenumber| [linenumber.to_i+1, linedata.chomp] }
     .reject { |number, data| data =~ /^(#|$)/ }
     .collect do |linenumber, linedata|

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

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