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

ruby-changes:45999

From: nobu <ko1@a...>
Date: Fri, 24 Mar 2017 00:55:03 +0900 (JST)
Subject: [ruby-changes:45999] nobu:r58070 (trunk): enc-unicode.rb: fix version matching

nobu	2017-03-24 00:55:00 +0900 (Fri, 24 Mar 2017)

  New Revision: 58070

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

  Log:
    enc-unicode.rb: fix version matching
    
    * tool/enc-unicode.rb (data_foreach): version comments do not
      include sub directory names.

  Modified files:
    trunk/tool/enc-unicode.rb
Index: tool/enc-unicode.rb
===================================================================
--- tool/enc-unicode.rb	(revision 58069)
+++ tool/enc-unicode.rb	(revision 58070)
@@ -307,7 +307,7 @@ end https://github.com/ruby/ruby/blob/trunk/tool/enc-unicode.rb#L307
 def data_foreach(name, &block)
   fn = get_file(name)
   warn "Reading #{name}"
-  pat = /^# #{name.sub(/\./, '-([\\d.]+)\\.')}/
+  pat = /^# #{File.basename(name).sub(/\./, '-([\\d.]+)\\.')}/
   File.open(fn, 'rb') do |f|
     line = f.gets
     unless pat =~ line

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

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