unicode-blocks 1.9.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +2 -2
- data/MIT-LICENSE.txt +1 -1
- data/README.md +21 -7
- data/data/blocks.marshal.gz +0 -0
- data/lib/unicode/blocks/constants.rb +2 -2
- data/lib/unicode/blocks.rb +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 197d5e8d3ed8609f6543fb4f037e738b00e1fc2548227bb866e0c3a7b818c0c1
|
4
|
+
data.tar.gz: f9360ec2852bd80677913811d4b7e91d86a5889ba0237a218ffcc0cf592fc6ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a00c7ff4691f71a45fb2875a0c2ff48b6dc2078cf9a5d692c1137b54466d86693e66af6e21cd0986ae23b3d268202f6e872cf4330ba1b9d4b3ad5b58860a9c1b
|
7
|
+
data.tar.gz: f5de9c1a7464940f1bc66858d00a79ecb05017e4f0cd4363b65eafc073a1213d33a75f2dd0ff28ab7a92254daae5734abb616f87bdd5276ed1e63083e900231b
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/MIT-LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -2,11 +2,7 @@
|
|
2
2
|
|
3
3
|
Each Unicode character belongs to a [block](https://en.wikipedia.org/wiki/Unicode_block). This gem returns the all blocks associated with the given string.
|
4
4
|
|
5
|
-
Unicode version: **
|
6
|
-
|
7
|
-
Supported Rubies: **3.2**, **3.1**, **3.0**
|
8
|
-
|
9
|
-
Old Rubies which might still work: **2.X**
|
5
|
+
Unicode version: **17.0.0** (September 2025)
|
10
6
|
|
11
7
|
## Gemfile
|
12
8
|
|
@@ -243,6 +239,7 @@ Osage
|
|
243
239
|
Elbasan
|
244
240
|
Caucasian Albanian
|
245
241
|
Vithkuqi
|
242
|
+
Todhri
|
246
243
|
Linear A
|
247
244
|
Latin Extended-F
|
248
245
|
Cypriot Syllabary
|
@@ -252,6 +249,7 @@ Nabataean
|
|
252
249
|
Hatran
|
253
250
|
Phoenician
|
254
251
|
Lydian
|
252
|
+
Sidetic
|
255
253
|
Meroitic Hieroglyphs
|
256
254
|
Meroitic Cursive
|
257
255
|
Kharoshthi
|
@@ -265,6 +263,7 @@ Psalter Pahlavi
|
|
265
263
|
Old Turkic
|
266
264
|
Old Hungarian
|
267
265
|
Hanifi Rohingya
|
266
|
+
Garay
|
268
267
|
Rumi Numeral Symbols
|
269
268
|
Yezidi
|
270
269
|
Arabic Extended-C
|
@@ -284,12 +283,14 @@ Khojki
|
|
284
283
|
Multani
|
285
284
|
Khudawadi
|
286
285
|
Grantha
|
286
|
+
Tulu-Tigalari
|
287
287
|
Newa
|
288
288
|
Tirhuta
|
289
289
|
Siddham
|
290
290
|
Modi
|
291
291
|
Mongolian Supplement
|
292
292
|
Takri
|
293
|
+
Myanmar Extended-C
|
293
294
|
Ahom
|
294
295
|
Dogra
|
295
296
|
Warang Citi
|
@@ -300,10 +301,13 @@ Soyombo
|
|
300
301
|
Unified Canadian Aboriginal Syllabics Extended-A
|
301
302
|
Pau Cin Hau
|
302
303
|
Devanagari Extended-A
|
304
|
+
Sharada Supplement
|
305
|
+
Sunuwar
|
303
306
|
Bhaiksuki
|
304
307
|
Marchen
|
305
308
|
Masaram Gondi
|
306
309
|
Gunjala Gondi
|
310
|
+
Tolong Siki
|
307
311
|
Makasar
|
308
312
|
Kawi
|
309
313
|
Lisu Supplement
|
@@ -314,19 +318,24 @@ Early Dynastic Cuneiform
|
|
314
318
|
Cypro-Minoan
|
315
319
|
Egyptian Hieroglyphs
|
316
320
|
Egyptian Hieroglyph Format Controls
|
321
|
+
Egyptian Hieroglyphs Extended-A
|
317
322
|
Anatolian Hieroglyphs
|
323
|
+
Gurung Khema
|
318
324
|
Bamum Supplement
|
319
325
|
Mro
|
320
326
|
Tangsa
|
321
327
|
Bassa Vah
|
322
328
|
Pahawh Hmong
|
329
|
+
Kirat Rai
|
323
330
|
Medefaidrin
|
331
|
+
Beria Erfe
|
324
332
|
Miao
|
325
333
|
Ideographic Symbols and Punctuation
|
326
334
|
Tangut
|
327
335
|
Tangut Components
|
328
336
|
Khitan Small Script
|
329
337
|
Tangut Supplement
|
338
|
+
Tangut Components Supplement
|
330
339
|
Kana Extended-B
|
331
340
|
Kana Supplement
|
332
341
|
Kana Extended-A
|
@@ -334,6 +343,8 @@ Small Kana Extension
|
|
334
343
|
Nushu
|
335
344
|
Duployan
|
336
345
|
Shorthand Format Controls
|
346
|
+
Symbols for Legacy Computing Supplement
|
347
|
+
Miscellaneous Symbols Supplement
|
337
348
|
Znamenny Musical Notation
|
338
349
|
Byzantine Musical Symbols
|
339
350
|
Musical Symbols
|
@@ -351,6 +362,8 @@ Nyiakeng Puachue Hmong
|
|
351
362
|
Toto
|
352
363
|
Wancho
|
353
364
|
Nag Mundari
|
365
|
+
Ol Onal
|
366
|
+
Tai Yo
|
354
367
|
Ethiopic Extended-B
|
355
368
|
Mende Kikakui
|
356
369
|
Adlam
|
@@ -382,15 +395,16 @@ CJK Unified Ideographs Extension I
|
|
382
395
|
CJK Compatibility Ideographs Supplement
|
383
396
|
CJK Unified Ideographs Extension G
|
384
397
|
CJK Unified Ideographs Extension H
|
398
|
+
CJK Unified Ideographs Extension J
|
385
399
|
Tags
|
386
400
|
Variation Selectors Supplement
|
387
401
|
Supplementary Private Use Area-A
|
388
402
|
Supplementary Private Use Area-B
|
389
403
|
```
|
390
404
|
|
391
|
-
See [unicode-x](https://github.com/janlelis/unicode-x) for more Unicode related micro libraries.
|
405
|
+
See [unicode-x](https://github.com/janlelis/unicode-x) for more Unicode related micro libraries and [unicode-block.js](https://www.npmjs.com/package/unicode-block) for a JavaScript version of this library.
|
392
406
|
|
393
407
|
## MIT License
|
394
408
|
|
395
|
-
- Copyright (C) 2016-
|
409
|
+
- Copyright (C) 2016-2025 Jan Lelis <https://janlelis.com>. Released under the MIT license.
|
396
410
|
- Unicode data: https://www.unicode.org/copyright.html#Exhibit1
|
data/data/blocks.marshal.gz
CHANGED
Binary file
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
module Unicode
|
4
4
|
module Blocks
|
5
|
-
VERSION = "1.
|
6
|
-
UNICODE_VERSION = "
|
5
|
+
VERSION = "1.11.0"
|
6
|
+
UNICODE_VERSION = "17.0.0"
|
7
7
|
DATA_DIRECTORY = File.expand_path(File.dirname(__FILE__) + "/../../../data/").freeze
|
8
8
|
INDEX_FILENAME = (DATA_DIRECTORY + "/blocks.marshal.gz").freeze
|
9
9
|
end
|
data/lib/unicode/blocks.rb
CHANGED
@@ -15,13 +15,13 @@ module Unicode
|
|
15
15
|
def self.block(char)
|
16
16
|
require_relative 'blocks/index' unless defined? ::Unicode::Blocks::INDEX
|
17
17
|
codepoint = char.unpack("U")[0] or raise(ArgumentError, "Unicode::Blocks.block must be given a valid char")
|
18
|
-
block_info = INDEX.bsearch{ |block_info| codepoint <= block_info[1] }
|
18
|
+
block_info = INDEX[:BLOCKS].bsearch{ |block_info| codepoint <= block_info[1] }
|
19
19
|
codepoint >= block_info[0] ? block_info[2] : "No_Block"
|
20
20
|
end
|
21
21
|
|
22
22
|
def self.names
|
23
23
|
require_relative 'blocks/index' unless defined? ::Unicode::Blocks::INDEX
|
24
|
-
INDEX.map(&:last)
|
24
|
+
INDEX[:BLOCKS].map(&:last)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unicode-blocks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Lelis
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: "[Unicode
|
13
|
+
description: "[Unicode 17.0.0] Answers the question: Which Unicode block does a code
|
14
14
|
point belong to?"
|
15
15
|
email:
|
16
16
|
- hi@ruby.consulting
|
@@ -38,7 +38,7 @@ licenses:
|
|
38
38
|
- MIT
|
39
39
|
metadata:
|
40
40
|
rubygems_mfa_required: 'true'
|
41
|
-
post_install_message:
|
41
|
+
post_install_message:
|
42
42
|
rdoc_options: []
|
43
43
|
require_paths:
|
44
44
|
- lib
|
@@ -53,8 +53,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
requirements: []
|
56
|
-
rubygems_version: 3.
|
57
|
-
signing_key:
|
56
|
+
rubygems_version: 3.5.21
|
57
|
+
signing_key:
|
58
58
|
specification_version: 4
|
59
59
|
summary: Return Unicode blocks of a string.
|
60
60
|
test_files:
|