unicode-numeric_value 1.12.0 → 1.13.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70d8508e52783a36a74ef9418d264befeb2433e446fdc929515a583138b83844
4
- data.tar.gz: 5d2688d5bc25a7eb707c23c49ffd21ec02120e0040b27ee1cd3e3723539e8c99
3
+ metadata.gz: 03aa3f01a99320487f114b05ceb3a666481413826958c0d5738f3adbdc048666
4
+ data.tar.gz: d155578489f0291c88f528e6b691cc9a84b6b7e52e5e8e11be975a392b04cbee
5
5
  SHA512:
6
- metadata.gz: 2d970d0db78bd27bec7490acb501c985e8a3ecac6ba841cf83a8556d3329d64a2260ffe94c0f9abd8a441ff74f7851f66ecac78e2d1f4a27a95c32b213ce6cbb
7
- data.tar.gz: 4d6218e4c368529445836de8cbd12c671422b1ef5d4af994098ae6357a7d287257a1b856278c0254dee8c6e0e3852fbb9672f22549657a044bb7e3175b8c44eb
6
+ metadata.gz: 5b78dff35fa16a9b63cc0222a907522a55d5a2050fd9e6012583e34bcce09a6705ba732d892497633c2fed1f4672e48c6606da739290f8ecf2e7f2234d0ac25e
7
+ data.tar.gz: f1c2a2d0869f0845726d06ef5890361a9793c936f4fa460737ba13db2fae0c1a789c78c5c0707f4218bf5733923468bd8ba0e7114b31346166cfbb7d3d23cf55
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## CHANGELOG
2
2
 
3
+ ### 1.13.0
4
+
5
+ - Unicode 18.0
6
+
3
7
  ### 1.12.0
4
8
 
5
9
  - Unicode 17.0
data/Gemfile CHANGED
@@ -3,5 +3,6 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  gem 'minitest'
6
+ gem 'minitest-mock'
6
7
  gem 'rake'
7
- gem 'irb' unless RUBY_ENGINE == "jruby"
8
+ gem 'irb'
data/Gemfile.lock CHANGED
@@ -1,24 +1,41 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- unicode-numeric_value (1.12.0)
4
+ unicode-numeric_value (1.13.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- io-console (0.6.0)
10
- irb (1.8.1)
11
- rdoc
12
- reline (>= 0.3.8)
13
- minitest (5.20.0)
14
- psych (5.1.0)
15
- stringio
16
- rake (13.0.6)
17
- rdoc (6.5.0)
18
- psych (>= 4.0.0)
19
- reline (0.3.8)
9
+ drb (2.2.3)
10
+ erb (6.0.7)
11
+ io-console (0.9.4)
12
+ irb (1.18.0)
13
+ pp (>= 0.6.0)
14
+ prism (>= 1.3.0)
15
+ rdoc (>= 4.0.0)
16
+ reline (>= 0.4.2)
17
+ logger (1.7.0)
18
+ minitest (6.0.6)
19
+ drb (~> 2.0)
20
+ prism (~> 1.5)
21
+ minitest-mock (5.27.0)
22
+ pp (0.6.4)
23
+ prettyprint
24
+ prettyprint (0.2.0)
25
+ prism (1.9.0)
26
+ rake (13.4.2)
27
+ rbs (4.2.0)
28
+ logger
29
+ prism (>= 1.6.0)
30
+ tsort
31
+ rdoc (8.0.0)
32
+ erb
33
+ prism (>= 1.6.0)
34
+ rbs (>= 4.0.0)
35
+ tsort
36
+ reline (0.7.0)
20
37
  io-console (~> 0.5)
21
- stringio (3.0.8)
38
+ tsort (0.2.0)
22
39
 
23
40
  PLATFORMS
24
41
  ruby
@@ -26,6 +43,7 @@ PLATFORMS
26
43
  DEPENDENCIES
27
44
  irb
28
45
  minitest
46
+ minitest-mock
29
47
  rake
30
48
  unicode-numeric_value!
31
49
 
data/MIT-LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2016-2025 Jan Lelis, https://janlelis.com
1
+ Copyright (c) 2016-2026 Jan Lelis, https://janlelis.com
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Convert a Unicode character into its numeric value.
4
4
 
5
- Unicode version: **17.0.0** (September 2025)
5
+ Unicode version: **18.0.0** (September 2026)
6
6
 
7
7
  ## Gemfile
8
8
 
@@ -55,8 +55,9 @@ puts "Codepoint | Character | Numeric Value | Name\n" \
55
55
  ## Also See
56
56
 
57
57
  - [unicode-x](https://github.com/janlelis/unicode-x): more Unicode related micro libraries
58
+ - JavaScript version: [unicode-number.js](https://github.com/janlelis/unicode-number.js)
58
59
 
59
60
  ## MIT License
60
61
 
61
- - Copyright (C) 2016-2025 Jan Lelis <https://janlelis.com>. Released under the MIT license.
62
+ - Copyright (C) 2016-2026 Jan Lelis <https://janlelis.com>. Released under the MIT license.
62
63
  - Unicode data: https://www.unicode.org/copyright.html#Exhibit1
Binary file
@@ -2,8 +2,8 @@
2
2
 
3
3
  module Unicode
4
4
  module NumericValue
5
- VERSION = "1.12.0"
6
- UNICODE_VERSION = "17.0.0"
5
+ VERSION = "1.13.0"
6
+ UNICODE_VERSION = "18.0.0"
7
7
  DATA_DIRECTORY = File.expand_path(File.dirname(__FILE__) + "/../../../data/").freeze
8
8
  INDEX_FILENAME = (DATA_DIRECTORY + "/numeric_value.marshal.gz").freeze
9
9
  end
@@ -1,4 +1,5 @@
1
1
  require_relative "../lib/unicode/numeric_value"
2
+ require "minitest/mock"
2
3
  require "minitest/autorun"
3
4
 
4
5
  describe Unicode::NumericValue do
@@ -10,6 +11,10 @@ describe Unicode::NumericValue do
10
11
  assert_equal 1000000000000, Unicode::NumericValue.of("𖭡")
11
12
  end
12
13
 
14
+ it "works with numbers from Unicode 18 (2026)" do
15
+ assert_equal 7, Unicode::NumericValue.of("\u{1257F}")
16
+ end
17
+
13
18
  it "works with numbers from Unicode 17 (2025)" do
14
19
  assert_equal 1, Unicode::NumericValue.of("𑷡")
15
20
  end
@@ -18,6 +23,10 @@ describe Unicode::NumericValue do
18
23
  assert_equal 7, Unicode::NumericValue.of("𜳷")
19
24
  end
20
25
 
26
+ it "works with numbers from Unicode 15 (2023)" do
27
+ assert_equal 0, Unicode::NumericValue.of("𝋀")
28
+ end
29
+
21
30
  it "will return rational values" do
22
31
  assert_equal 3/4r, Unicode::NumericValue.of("¾")
23
32
  assert_equal -1/2r, Unicode::NumericValue.of("༳")
@@ -27,10 +36,6 @@ describe Unicode::NumericValue do
27
36
  assert_nil Unicode::NumericValue.of("A")
28
37
  assert_nil Unicode::NumericValue.of("\0")
29
38
  end
30
-
31
- it "works with numbers from recent Unicode versions" do
32
- assert_equal 0, Unicode::NumericValue.of("𝋀") # Unicode 15.0
33
- end
34
39
  end
35
40
 
36
41
  describe ".chars" do
metadata CHANGED
@@ -1,16 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicode-numeric_value
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.0
4
+ version: 1.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-09-09 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
- description: "[Unicode 17.0.0] Returns the numeric value associated with a Unicode
12
+ description: "[Unicode 18.0.0] Returns the numeric value associated with a Unicode
14
13
  character"
15
14
  email:
16
15
  - hi@ruby.consulting
@@ -39,7 +38,6 @@ licenses:
39
38
  - MIT
40
39
  metadata:
41
40
  rubygems_mfa_required: 'true'
42
- post_install_message:
43
41
  rdoc_options: []
44
42
  require_paths:
45
43
  - lib
@@ -54,8 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
52
  - !ruby/object:Gem::Version
55
53
  version: '0'
56
54
  requirements: []
57
- rubygems_version: 3.5.21
58
- signing_key:
55
+ rubygems_version: 4.0.21
59
56
  specification_version: 4
60
57
  summary: Returns the numeric value associated with a Unicode character
61
58
  test_files: