diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-16 13:01:30 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-16 13:01:30 +0000 |
commit | 2ae5e54e62c1525d6058c35c4bd86b04a45384c4 (patch) | |
tree | c64cbe684159ce0d69a2738231b8288d4c235304 /tool | |
parent | fc95326e1f6bb38554709680ac0b97370d758a59 (diff) | |
download | ruby-2ae5e54e62c1525d6058c35c4bd86b04a45384c4.tar.gz |
open Unicode data in binary mode
* tool/enc-unicode.rb (data_foreach): open in binary mode because
Unicode 9.0.0 contains non-ascii characters.
* template/unicode_norm_gen.tmpl: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/enc-unicode.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/enc-unicode.rb b/tool/enc-unicode.rb index e7b979a639..83bbe352e1 100755 --- a/tool/enc-unicode.rb +++ b/tool/enc-unicode.rb @@ -281,7 +281,7 @@ def data_foreach(name, &block) fn = get_file(name) warn "Reading #{name}" pat = /^# #{name.sub(/\./, '-([\\d.]+)\\.')}/ - File.open(fn) do |f| + File.open(fn, 'rb') do |f| line = f.gets unless pat =~ line raise ArgumentError, "#{name}: no Unicode version" |