unicode-blocks 1.10.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 +5 -0
- data/Gemfile.lock +2 -2
- data/MIT-LICENSE.txt +1 -1
- data/README.md +11 -7
- data/data/blocks.marshal.gz +0 -0
- data/lib/unicode/blocks/constants.rb +2 -2
- data/lib/unicode/blocks.rb +2 -2
- metadata +4 -4
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.3**, **3.2**, **3.1**, **3.0**
|
8
|
-
|
9
|
-
Old Rubies which might still work: **2.7**, **2.6**, **2.5**, **2.4**, **2.3**, **2.X**
|
5
|
+
Unicode version: **17.0.0** (September 2025)
|
10
6
|
|
11
7
|
## Gemfile
|
12
8
|
|
@@ -253,6 +249,7 @@ Nabataean
|
|
253
249
|
Hatran
|
254
250
|
Phoenician
|
255
251
|
Lydian
|
252
|
+
Sidetic
|
256
253
|
Meroitic Hieroglyphs
|
257
254
|
Meroitic Cursive
|
258
255
|
Kharoshthi
|
@@ -304,11 +301,13 @@ Soyombo
|
|
304
301
|
Unified Canadian Aboriginal Syllabics Extended-A
|
305
302
|
Pau Cin Hau
|
306
303
|
Devanagari Extended-A
|
304
|
+
Sharada Supplement
|
307
305
|
Sunuwar
|
308
306
|
Bhaiksuki
|
309
307
|
Marchen
|
310
308
|
Masaram Gondi
|
311
309
|
Gunjala Gondi
|
310
|
+
Tolong Siki
|
312
311
|
Makasar
|
313
312
|
Kawi
|
314
313
|
Lisu Supplement
|
@@ -329,12 +328,14 @@ Bassa Vah
|
|
329
328
|
Pahawh Hmong
|
330
329
|
Kirat Rai
|
331
330
|
Medefaidrin
|
331
|
+
Beria Erfe
|
332
332
|
Miao
|
333
333
|
Ideographic Symbols and Punctuation
|
334
334
|
Tangut
|
335
335
|
Tangut Components
|
336
336
|
Khitan Small Script
|
337
337
|
Tangut Supplement
|
338
|
+
Tangut Components Supplement
|
338
339
|
Kana Extended-B
|
339
340
|
Kana Supplement
|
340
341
|
Kana Extended-A
|
@@ -343,6 +344,7 @@ Nushu
|
|
343
344
|
Duployan
|
344
345
|
Shorthand Format Controls
|
345
346
|
Symbols for Legacy Computing Supplement
|
347
|
+
Miscellaneous Symbols Supplement
|
346
348
|
Znamenny Musical Notation
|
347
349
|
Byzantine Musical Symbols
|
348
350
|
Musical Symbols
|
@@ -361,6 +363,7 @@ Toto
|
|
361
363
|
Wancho
|
362
364
|
Nag Mundari
|
363
365
|
Ol Onal
|
366
|
+
Tai Yo
|
364
367
|
Ethiopic Extended-B
|
365
368
|
Mende Kikakui
|
366
369
|
Adlam
|
@@ -392,15 +395,16 @@ CJK Unified Ideographs Extension I
|
|
392
395
|
CJK Compatibility Ideographs Supplement
|
393
396
|
CJK Unified Ideographs Extension G
|
394
397
|
CJK Unified Ideographs Extension H
|
398
|
+
CJK Unified Ideographs Extension J
|
395
399
|
Tags
|
396
400
|
Variation Selectors Supplement
|
397
401
|
Supplementary Private Use Area-A
|
398
402
|
Supplementary Private Use Area-B
|
399
403
|
```
|
400
404
|
|
401
|
-
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.
|
402
406
|
|
403
407
|
## MIT License
|
404
408
|
|
405
|
-
- Copyright (C) 2016-
|
409
|
+
- Copyright (C) 2016-2025 Jan Lelis <https://janlelis.com>. Released under the MIT license.
|
406
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
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
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
requirements: []
|
56
|
-
rubygems_version: 3.5.
|
56
|
+
rubygems_version: 3.5.21
|
57
57
|
signing_key:
|
58
58
|
specification_version: 4
|
59
59
|
summary: Return Unicode blocks of a string.
|