Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- ext/encoding/character/utf-8/data/generate-unicode-data.rb
Instance Method Summary collapse
- #verify_field(index, code, path, raw_code, type, ccase) ⇒ Object
- #verify_size(wanted, path, index) ⇒ Object
Instance Method Details
#verify_field(index, code, path, raw_code, type, ccase) ⇒ Object
71 72 73 74 75 76 77 78 |
# File 'ext/encoding/character/utf-8/data/generate-unicode-data.rb', line 71 def verify_field(index, code, path, raw_code, type, ccase) if self[index].to_i(16) != code error("entry has type %s but UCD_%s(%s) != %s:\n" + " file: %s\n" + " entry: %s\n", type, ccase, raw_code, raw_code, path, raw_code) end end |
#verify_size(wanted, path, index) ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'ext/encoding/character/utf-8/data/generate-unicode-data.rb', line 58 def verify_size(wanted, path, index) if !(wanted === self.size) error("entry doesn't contain the required %s fields:\n" + " file: %s\n" + " entry: %s\n" + " field count: %d\n", wanted.to_s, path, (self.size > index) ? self[index] : 'N/A', self.size) end end |