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 | d43074aeca1c79e2f414b07d2e16b24f43c21344 (patch) | |
tree | 2fffe7ceaa4d951cb26fb3ae878ea2a334003ba4 /tool | |
parent | 96784e4b58736f7998e6d1ce96d48a5ba55b5811 (diff) | |
download | ruby-d43074aeca1c79e2f414b07d2e16b24f43c21344.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 |