net-imap 0.4.1 → 0.4.4

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.
@@ -1,39 +0,0 @@
1
- prelude: |
2
- require "json"
3
- require "set"
4
-
5
- all_codepoints = (0..0x10ffff).map{_1.chr("UTF-8") rescue nil}.compact
6
-
7
- rfc3454_tables = Dir["rfcs/rfc3454*.json"]
8
- .first
9
- .then{File.read _1}
10
- .then{JSON.parse _1}
11
- titles = rfc3454_tables.delete("titles")
12
-
13
- sets = rfc3454_tables
14
- .transform_values{|t|t.keys rescue t}
15
- .transform_values{|table|
16
- table
17
- .map{_1.split(?-).map{|i|Integer i, 16}}
18
- .flat_map{_2 ? (_1.._2).to_a : _1}
19
- .to_set
20
- }
21
-
22
- TABLE_A1_SET = sets.fetch "A.1"
23
- ASSIGNED_3_2 = /\p{AGE=3.2}/
24
- UNASSIGNED_3_2 = /\P{AGE=3.2}/
25
- TABLE_A1_REGEX = /(?-mix:[\u{0000}-\u{001f}\u{007f}-\u{00a0}\u{0340}-\u{0341}\u{06dd}\u{070f}\u{1680}\u{180e}\u{2000}-\u{200f}\u{2028}-\u{202f}\u{205f}-\u{2063}\u{206a}-\u{206f}\u{2ff0}-\u{2ffb}\u{3000}\u{e000}-\u{f8ff}\u{fdd0}-\u{fdef}\u{feff}\u{fff9}-\u{ffff}\u{1d173}-\u{1d17a}\u{1fffe}-\u{1ffff}\u{2fffe}-\u{2ffff}\u{3fffe}-\u{3ffff}\u{4fffe}-\u{4ffff}\u{5fffe}-\u{5ffff}\u{6fffe}-\u{6ffff}\u{7fffe}-\u{7ffff}\u{8fffe}-\u{8ffff}\u{9fffe}-\u{9ffff}\u{afffe}-\u{affff}\u{bfffe}-\u{bffff}\u{cfffe}-\u{cffff}\u{dfffe}-\u{dffff}\u{e0001}\u{e0020}-\u{e007f}\u{efffe}-\u{10ffff}])|(?-mix:\p{Cs})/.freeze
26
-
27
- benchmark:
28
-
29
- # matches A.1
30
- - script: "all_codepoints.grep(TABLE_A1_SET)"
31
- - script: "all_codepoints.grep(TABLE_A1_REGEX)"
32
- - script: "all_codepoints.grep(UNASSIGNED_3_2)"
33
- - script: "all_codepoints.grep_v(ASSIGNED_3_2)"
34
-
35
- # doesn't match A.1
36
- - script: "all_codepoints.grep_v(TABLE_A1_SET)"
37
- - script: "all_codepoints.grep_v(TABLE_A1_REGEX)"
38
- - script: "all_codepoints.grep_v(UNASSIGNED_3_2)"
39
- - script: "all_codepoints.grep(ASSIGNED_3_2)"