1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2017-03-23 15:55:00 +00:00
parent 81ab413288
commit e1e5857c08

View file

@ -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