diff options
author | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-06 02:21:23 +0000 |
---|---|---|
committer | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-06 02:21:23 +0000 |
commit | daea1a5f3ae7a2faaab131f74c79146ff080523f (patch) | |
tree | 75aa22d413d33e87d238431795405163fda8424d /tool | |
parent | 42b382841ce4b6d341d6b40b7fab75445f4319d6 (diff) |
tool/unicode_norm_gen.rb: Adding/tweaking comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r-- | tool/unicode_norm_gen.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tool/unicode_norm_gen.rb b/tool/unicode_norm_gen.rb index 03a32bbdc5..c90b16dac5 100644 --- a/tool/unicode_norm_gen.rb +++ b/tool/unicode_norm_gen.rb @@ -1,14 +1,17 @@ # coding: utf-8 -# Copyright 2010-2013 Ayumu Nojima (野島 歩) and Martin J. Dürst ([email protected]) -# available under the same licence as Ruby itself -# (see http://www.ruby-lang.org/en/LICENSE.txt) +# Copyright Ayumu Nojima (野島 歩) and Martin J. Dürst ([email protected]) +# Script to generate Ruby data structures used in implementing +# String#unicode_normalize,... + +# Constants for input and ouput directory InputDataDir = '../enc/unicode/data' OuputDataDir = '../lib/unicode_normalize' +# convenience methods class Integer - def to_UTF8() + def to_UTF8() # convert to string, taking legibility into account if self>0xFFFF "\\u{#{to_s(16).upcase}}" elsif CombiningClass[self] or self=='\\'.ord or self=='"'.ord @@ -135,7 +138,7 @@ end.line_slice "\n " open("#{OuputDataDir}/normalize_tables.rb", "w").print <<MAPPING_TABLE_FILE_END # coding: utf-8 -# automatically generated by generate.rb +# automatically generated by tool/unicode_norm_gen.rb module Normalize ACCENTS = " |