diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-07-15 00:53:50 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-07-15 00:53:50 +0000 |
commit | e827c334c3a03e1ad75792605c021695a5b74fd6 (patch) | |
tree | 2fffe7ceaa4d951cb26fb3ae878ea2a334003ba4 /tool | |
parent | ed5401a696fe284b71c015fb4974396755354a7d (diff) | |
download | ruby-e827c334c3a03e1ad75792605c021695a5b74fd6.tar.gz |
enc/unicode: check Unicode versions
* enc/unicode/case-folding.rb, tool/enc-unicode.rb: check if
Unicode versions are consistent with each other.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/enc-unicode.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tool/enc-unicode.rb b/tool/enc-unicode.rb index 4eea2108ec..e7b979a639 100755 --- a/tool/enc-unicode.rb +++ b/tool/enc-unicode.rb @@ -454,6 +454,18 @@ uniname2ctype(const UChar *name, unsigned int len) return -1; } __HEREDOC +versions = $unicode_version.scan(/\d+/) +print("#if defined ONIG_UNICODE_VERSION_STRING && !( \\\n") +%w[MAJOR MINOR TEENY].zip(versions) do |n, v| + print(" ONIG_UNICODE_VERSION_#{n} == #{v} && \\\n") +end +print(" 1)\n") +print("# error ONIG_UNICODE_VERSION_STRING mismatch\n") +print("#endif\n") +print("#define ONIG_UNICODE_VERSION_STRING #{$unicode_version.dump}\n") +%w[MAJOR MINOR TEENY].zip(versions) do |n, v| + print("#define ONIG_UNICODE_VERSION_#{n} #{v}\n") +end output.restore |