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

ruby-changes:43422

From: nobu <ko1@a...>
Date: Fri, 24 Jun 2016 14:29:32 +0900 (JST)
Subject: [ruby-changes:43422] nobu:r55496 (trunk): Read CaseFolding.txt in binary mode

nobu	2016-06-24 14:29:28 +0900 (Fri, 24 Jun 2016)

  New Revision: 55496

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

  Log:
    Read CaseFolding.txt in binary mode
    
    * enc/unicode/case-folding.rb (CaseFolding#load): read in binary
      mode to deal with non-ASCII charater in CaseFolding.txt.

  Modified files:
    trunk/enc/unicode/case-folding.rb
Index: enc/unicode/case-folding.rb
===================================================================
--- enc/unicode/case-folding.rb	(revision 55495)
+++ enc/unicode/case-folding.rb	(revision 55496)
@@ -55,7 +55,7 @@ class CaseFolding https://github.com/ruby/ruby/blob/trunk/enc/unicode/case-folding.rb#L55
     @debug = false
     turkic = []
 
-    IO.foreach(filename) do |line|
+    IO.foreach(filename, mode: "rb") do |line|
       next unless res = pattern.match(line)
       ch_from = res[1].to_i(16)
 

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

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