From e1e5857c08fb6754dcc950ffb8e473fca9232cb6 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 23 Mar 2017 15:55:00 +0000 Subject: enc-unicode.rb: fix version matching * tool/enc-unicode.rb (data_foreach): version comments do not include sub directory names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/enc-unicode.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/enc-unicode.rb b/tool/enc-unicode.rb index 220c46c8ef..baa05da496 100755 --- a/tool/enc-unicode.rb +++ b/tool/enc-unicode.rb @@ -307,7 +307,7 @@ end 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 -- cgit v1.2.3