mirror of
https://github.com/ruby/ruby.git
synced 2025-08-26 22:45:03 +02:00
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
This commit is contained in:
parent
ed5401a696
commit
e827c334c3
5 changed files with 61 additions and 28 deletions
|
@ -155,8 +155,16 @@ class CaseFolding
|
|||
dest.print("/* DO NOT EDIT THIS FILE. */\n")
|
||||
dest.print("/* Generated by enc/unicode/case-folding.rb */\n\n")
|
||||
|
||||
versions = version.scan(/\d+/)
|
||||
dest.print("#if defined ONIG_UNICODE_VERSION_STRING && !( \\\n")
|
||||
%w[MAJOR MINOR TEENY].zip(versions) do |n, v|
|
||||
dest.print(" ONIG_UNICODE_VERSION_#{n} == #{v} && \\\n")
|
||||
end
|
||||
dest.print(" 1)\n")
|
||||
dest.print("# error ONIG_UNICODE_VERSION_STRING mismatch\n")
|
||||
dest.print("#endif\n")
|
||||
dest.print("#define ONIG_UNICODE_VERSION_STRING #{version.dump}\n")
|
||||
%w[MAJOR MINOR TEENY].zip(version.scan(/\d+/)) do |n, v|
|
||||
%w[MAJOR MINOR TEENY].zip(versions) do |n, v|
|
||||
dest.print("#define ONIG_UNICODE_VERSION_#{n} #{v}\n")
|
||||
end
|
||||
dest.print("\n")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue