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

ruby-changes:53717

From: duerst <ko1@a...>
Date: Fri, 23 Nov 2018 15:45:30 +0900 (JST)
Subject: [ruby-changes:53717] duerst:r65933 (trunk): prepare for Unicode 11.0.0 update

duerst	2018-11-23 15:45:26 +0900 (Fri, 23 Nov 2018)

  New Revision: 65933

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

  Log:
    prepare for Unicode 11.0.0 update
    
    - enc/unicode/case-folding.rb:
      - Convert unpredicted case to actual flag setting
      - Eliminate an unused variable
      - Change a variable name to avoid a warning

  Modified files:
    trunk/enc/unicode/case-folding.rb
Index: enc/unicode/case-folding.rb
===================================================================
--- enc/unicode/case-folding.rb	(revision 65932)
+++ enc/unicode/case-folding.rb	(revision 65933)
@@ -264,7 +264,6 @@ class CaseMapping https://github.com/ruby/ruby/blob/trunk/enc/unicode/case-folding.rb#L264
     from = Array(from).map {|i| "%04X" % i}.join(" ")
     to   = Array(to).map {|i| "%04X" % i}.join(" ")
     item = map(from)
-    specials_index = nil
     specials = []
     case type
     when 'CaseFold_11'
@@ -309,7 +308,7 @@ class CaseMapping https://github.com/ruby/ruby/blob/trunk/enc/unicode/case-folding.rb#L308
         end
         unless item.upper == item.title
           if item.code == item.title
-            raise "Unpredicted case 1 in enc/unicode/case_folding.rb. Please contact https://bugs.ruby-lang.org/."
+            flags += '|IT'   # was unpredicted case 1
           elsif item.title==to[1]
             flags += '|ST'
           else
@@ -410,8 +409,8 @@ if $0 == __FILE__ https://github.com/ruby/ruby/blob/trunk/enc/unicode/case-folding.rb#L409
     s = f.string
   end
   if dest
-    open(dest, "wb") do |f|
-      f.print(s)
+    open(dest, "wb") do |file|
+      file.print(s)
     end
   else
     STDOUT.print(s)

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

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