re2 2.9.0 → 2.27.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/Gemfile +6 -0
- data/README.md +130 -22
- data/Rakefile +52 -90
- data/dependencies.yml +4 -4
- data/ext/re2/extconf.rb +256 -290
- data/ext/re2/re2.cc +1037 -318
- data/ext/re2/recipes.rb +24 -21
- data/lib/re2/regexp.rb +2 -0
- data/lib/re2/scanner.rb +2 -0
- data/lib/re2/string.rb +8 -6
- data/lib/re2/version.rb +1 -1
- data/lib/re2.rb +2 -0
- data/ports/archives/20260107.1.tar.gz +0 -0
- data/ports/archives/re2-2025-11-05.tar.gz +0 -0
- data/re2.gemspec +6 -4
- data/spec/kernel_spec.rb +2 -0
- data/spec/re2/match_data_spec.rb +520 -5
- data/spec/re2/regexp_spec.rb +342 -0
- data/spec/re2/scanner_spec.rb +185 -15
- data/spec/re2/set_spec.rb +123 -6
- data/spec/re2/string_spec.rb +2 -0
- data/spec/re2_spec.rb +219 -43
- data/spec/spec_helper.rb +2 -0
- metadata +17 -21
- data/ports/archives/20240116.1.tar.gz +0 -0
- data/ports/archives/re2-2024-03-01.tar.gz +0 -0
data/spec/re2_spec.rb
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
RSpec.describe RE2 do
|
|
2
|
-
describe ".
|
|
4
|
+
describe ".replace" do
|
|
3
5
|
it "only replaces the first occurrence of the pattern" do
|
|
4
|
-
expect(RE2.
|
|
6
|
+
expect(RE2.replace("woo", "o", "a")).to eq("wao")
|
|
5
7
|
end
|
|
6
8
|
|
|
7
9
|
it "supports inputs with null bytes" do
|
|
8
|
-
expect(RE2.
|
|
10
|
+
expect(RE2.replace("w\0oo", "o", "a")).to eq("w\0ao")
|
|
9
11
|
end
|
|
10
12
|
|
|
11
13
|
it "supports patterns with null bytes" do
|
|
12
|
-
expect(RE2.
|
|
14
|
+
expect(RE2.replace("w\0oo", "\0", "o")).to eq("wooo")
|
|
13
15
|
end
|
|
14
16
|
|
|
15
17
|
it "supports replacements with null bytes" do
|
|
16
|
-
expect(RE2.
|
|
18
|
+
expect(RE2.replace("woo", "o", "\0")).to eq("w\0o")
|
|
17
19
|
end
|
|
18
20
|
|
|
19
21
|
it "performs replacement based on regular expressions" do
|
|
20
|
-
expect(RE2.
|
|
22
|
+
expect(RE2.replace("woo", "o+", "e")).to eq("we")
|
|
21
23
|
end
|
|
22
24
|
|
|
23
25
|
it "supports flags in patterns" do
|
|
24
|
-
expect(RE2.
|
|
26
|
+
expect(RE2.replace("Good morning", "(?i)gOOD MORNING", "hi")).to eq("hi")
|
|
25
27
|
end
|
|
26
28
|
|
|
27
29
|
it "does not perform replacements in-place", :aggregate_failures do
|
|
28
30
|
name = "Robert"
|
|
29
|
-
replacement = RE2.
|
|
31
|
+
replacement = RE2.replace(name, "R", "Cr")
|
|
30
32
|
|
|
31
33
|
expect(name).to eq("Robert")
|
|
32
34
|
expect(replacement).to eq("Crobert")
|
|
@@ -35,88 +37,118 @@ RSpec.describe RE2 do
|
|
|
35
37
|
it "supports passing an RE2::Regexp as the pattern" do
|
|
36
38
|
re = RE2::Regexp.new('wo{2}')
|
|
37
39
|
|
|
38
|
-
expect(RE2.
|
|
40
|
+
expect(RE2.replace("woo", re, "miaow")).to eq("miaow")
|
|
39
41
|
end
|
|
40
42
|
|
|
41
43
|
it "respects any passed RE2::Regexp's flags" do
|
|
42
44
|
re = RE2::Regexp.new('gOOD MORNING', case_sensitive: false)
|
|
43
45
|
|
|
44
|
-
expect(RE2.
|
|
46
|
+
expect(RE2.replace("Good morning", re, "hi")).to eq("hi")
|
|
45
47
|
end
|
|
46
48
|
|
|
47
49
|
it "supports passing something that can be coerced to a String as input" do
|
|
48
|
-
expect(RE2.
|
|
50
|
+
expect(RE2.replace(StringLike.new("woo"), "oo", "ah")).to eq("wah")
|
|
49
51
|
end
|
|
50
52
|
|
|
51
53
|
it "supports passing something that can be coerced to a String as a pattern" do
|
|
52
|
-
expect(RE2.
|
|
54
|
+
expect(RE2.replace("woo", StringLike.new("oo"), "ah")).to eq("wah")
|
|
53
55
|
end
|
|
54
56
|
|
|
55
57
|
it "supports passing something that can be coerced to a String as a replacement" do
|
|
56
|
-
expect(RE2.
|
|
58
|
+
expect(RE2.replace("woo", "oo", StringLike.new("ah"))).to eq("wah")
|
|
57
59
|
end
|
|
58
60
|
|
|
59
61
|
it "returns UTF-8 strings if the pattern is UTF-8" do
|
|
60
62
|
original = "Foo".encode("ISO-8859-1")
|
|
61
|
-
replacement = RE2.
|
|
63
|
+
replacement = RE2.replace(original, "oo", "ah")
|
|
62
64
|
|
|
63
65
|
expect(replacement.encoding).to eq(Encoding::UTF_8)
|
|
64
66
|
end
|
|
65
67
|
|
|
66
68
|
it "returns ISO-8859-1 strings if the pattern is not UTF-8" do
|
|
67
69
|
original = "Foo"
|
|
68
|
-
replacement = RE2.
|
|
70
|
+
replacement = RE2.replace(original, RE2("oo", utf8: false), "ah")
|
|
69
71
|
|
|
70
72
|
expect(replacement.encoding).to eq(Encoding::ISO_8859_1)
|
|
71
73
|
end
|
|
72
74
|
|
|
73
75
|
it "returns UTF-8 strings when given a String pattern" do
|
|
74
|
-
replacement = RE2.
|
|
76
|
+
replacement = RE2.replace("Foo", "oo".encode("ISO-8859-1"), "ah")
|
|
75
77
|
|
|
76
78
|
expect(replacement.encoding).to eq(Encoding::UTF_8)
|
|
77
79
|
end
|
|
78
80
|
|
|
79
81
|
it "raises a Type Error for input that can't be converted to String" do
|
|
80
|
-
expect { RE2.
|
|
82
|
+
expect { RE2.replace(0, "oo", "ah") }.to raise_error(TypeError)
|
|
81
83
|
end
|
|
82
84
|
|
|
83
85
|
it "raises a Type Error for a non-RE2::Regexp pattern that can't be converted to String" do
|
|
84
|
-
expect { RE2.
|
|
86
|
+
expect { RE2.replace("woo", 0, "ah") }.to raise_error(TypeError)
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
it "does not leak memory when given a non-String, non-RE2::Regexp pattern" do
|
|
90
|
+
expect { RE2.replace("a" * 128, 0, "ah") }.to raise_error(TypeError)
|
|
85
91
|
end
|
|
86
92
|
|
|
87
93
|
it "raises a Type Error for a replacement that can't be converted to String" do
|
|
88
|
-
expect { RE2.
|
|
94
|
+
expect { RE2.replace("woo", "oo", 0) }.to raise_error(TypeError)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
it "can be run concurrently with the same RE2::Regexp pattern" do
|
|
98
|
+
re = RE2::Regexp.new('(\w+)\s(\w+)')
|
|
99
|
+
|
|
100
|
+
threads = 10.times.map do
|
|
101
|
+
Thread.new { RE2.replace("one two", re, '\2 \1') }
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
expect(threads.map(&:value)).to all(eq("two one"))
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
it "can be run concurrently with the same string pattern" do
|
|
108
|
+
re = '(\w+)\s(\w+)'
|
|
109
|
+
|
|
110
|
+
threads = 10.times.map do
|
|
111
|
+
Thread.new { RE2.replace("one two", re, '\2 \1') }
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
expect(threads.map(&:value)).to all(eq("two one"))
|
|
89
115
|
end
|
|
90
116
|
end
|
|
91
117
|
|
|
92
|
-
describe ".
|
|
118
|
+
describe ".Replace" do
|
|
119
|
+
it "is an alias for .replace" do
|
|
120
|
+
expect(RE2.Replace("woo", "o", "a")).to eq("wao")
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
describe ".global_replace" do
|
|
93
125
|
it "replaces every occurrence of a pattern" do
|
|
94
|
-
expect(RE2.
|
|
126
|
+
expect(RE2.global_replace("woo", "o", "a")).to eq("waa")
|
|
95
127
|
end
|
|
96
128
|
|
|
97
129
|
it "supports inputs with null bytes" do
|
|
98
|
-
expect(RE2.
|
|
130
|
+
expect(RE2.global_replace("w\0oo", "o", "a")).to eq("w\0aa")
|
|
99
131
|
end
|
|
100
132
|
|
|
101
133
|
it "supports patterns with null bytes" do
|
|
102
|
-
expect(RE2.
|
|
134
|
+
expect(RE2.global_replace("w\0\0oo", "\0", "a")).to eq("waaoo")
|
|
103
135
|
end
|
|
104
136
|
|
|
105
137
|
it "supports replacements with null bytes" do
|
|
106
|
-
expect(RE2.
|
|
138
|
+
expect(RE2.global_replace("woo", "o", "\0")).to eq("w\0\0")
|
|
107
139
|
end
|
|
108
140
|
|
|
109
141
|
it "performs replacement based on regular expressions" do
|
|
110
|
-
expect(RE2.
|
|
142
|
+
expect(RE2.global_replace("woohoo", "o+", "e")).to eq("wehe")
|
|
111
143
|
end
|
|
112
144
|
|
|
113
145
|
it "supports flags in patterns" do
|
|
114
|
-
expect(RE2.
|
|
146
|
+
expect(RE2.global_replace("Robert", "(?i)r", "w")).to eq("wobewt")
|
|
115
147
|
end
|
|
116
148
|
|
|
117
149
|
it "does not perform replacement in-place", :aggregate_failures do
|
|
118
150
|
name = "Robert"
|
|
119
|
-
replacement = RE2.
|
|
151
|
+
replacement = RE2.global_replace(name, "(?i)R", "w")
|
|
120
152
|
|
|
121
153
|
expect(name).to eq("Robert")
|
|
122
154
|
expect(replacement).to eq("wobewt")
|
|
@@ -125,75 +157,219 @@ RSpec.describe RE2 do
|
|
|
125
157
|
it "supports passing an RE2::Regexp as the pattern" do
|
|
126
158
|
re = RE2::Regexp.new('wo{2,}')
|
|
127
159
|
|
|
128
|
-
expect(RE2.
|
|
160
|
+
expect(RE2.global_replace("woowooo", re, "miaow")).to eq("miaowmiaow")
|
|
129
161
|
end
|
|
130
162
|
|
|
131
163
|
it "respects any passed RE2::Regexp's flags" do
|
|
132
164
|
re = RE2::Regexp.new('gOOD MORNING', case_sensitive: false)
|
|
133
165
|
|
|
134
|
-
expect(RE2.
|
|
166
|
+
expect(RE2.global_replace("Good morning Good morning", re, "hi")).to eq("hi hi")
|
|
135
167
|
end
|
|
136
168
|
|
|
137
169
|
it "supports passing something that can be coerced to a String as input" do
|
|
138
|
-
expect(RE2.
|
|
170
|
+
expect(RE2.global_replace(StringLike.new("woo"), "o", "a")).to eq("waa")
|
|
139
171
|
end
|
|
140
172
|
|
|
141
173
|
it "supports passing something that can be coerced to a String as a pattern" do
|
|
142
|
-
expect(RE2.
|
|
174
|
+
expect(RE2.global_replace("woo", StringLike.new("o"), "a")).to eq("waa")
|
|
143
175
|
end
|
|
144
176
|
|
|
145
177
|
it "supports passing something that can be coerced to a String as a replacement" do
|
|
146
|
-
expect(RE2.
|
|
178
|
+
expect(RE2.global_replace("woo", "o", StringLike.new("a"))).to eq("waa")
|
|
147
179
|
end
|
|
148
180
|
|
|
149
181
|
it "returns UTF-8 strings if the pattern is UTF-8" do
|
|
150
182
|
original = "Foo".encode("ISO-8859-1")
|
|
151
|
-
replacement = RE2.
|
|
183
|
+
replacement = RE2.global_replace(original, "oo", "ah")
|
|
152
184
|
|
|
153
185
|
expect(replacement.encoding).to eq(Encoding::UTF_8)
|
|
154
186
|
end
|
|
155
187
|
|
|
156
188
|
it "returns ISO-8859-1 strings if the pattern is not UTF-8" do
|
|
157
189
|
original = "Foo"
|
|
158
|
-
replacement = RE2.
|
|
190
|
+
replacement = RE2.global_replace(original, RE2("oo", utf8: false), "ah")
|
|
159
191
|
|
|
160
192
|
expect(replacement.encoding).to eq(Encoding::ISO_8859_1)
|
|
161
193
|
end
|
|
162
194
|
|
|
163
195
|
it "returns UTF-8 strings when given a String pattern" do
|
|
164
|
-
replacement = RE2.
|
|
196
|
+
replacement = RE2.global_replace("Foo", "oo".encode("ISO-8859-1"), "ah")
|
|
165
197
|
|
|
166
198
|
expect(replacement.encoding).to eq(Encoding::UTF_8)
|
|
167
199
|
end
|
|
168
200
|
|
|
169
201
|
it "raises a Type Error for input that can't be converted to String" do
|
|
170
|
-
expect { RE2.
|
|
202
|
+
expect { RE2.global_replace(0, "o", "a") }.to raise_error(TypeError)
|
|
171
203
|
end
|
|
172
204
|
|
|
173
205
|
it "raises a Type Error for a non-RE2::Regexp pattern that can't be converted to String" do
|
|
174
|
-
expect { RE2.
|
|
206
|
+
expect { RE2.global_replace("woo", 0, "a") }.to raise_error(TypeError)
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
it "does not leak memory when given a non-String, non-RE2::Regexp pattern" do
|
|
210
|
+
expect { RE2.global_replace("a" * 128, 0, "a") }.to raise_error(TypeError)
|
|
175
211
|
end
|
|
176
212
|
|
|
177
213
|
it "raises a Type Error for a replacement that can't be converted to String" do
|
|
178
|
-
expect { RE2.
|
|
214
|
+
expect { RE2.global_replace("woo", "o", 0) }.to raise_error(TypeError)
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
it "can be run concurrently with the same RE2::Regexp pattern" do
|
|
218
|
+
re = RE2::Regexp.new('(\w+)\s(\w+)')
|
|
219
|
+
|
|
220
|
+
threads = 10.times.map do
|
|
221
|
+
Thread.new { RE2.global_replace("one two three four", re, '\2 \1') }
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
expect(threads.map(&:value)).to all(eq("two one four three"))
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
it "can be run concurrently with the same string pattern" do
|
|
228
|
+
re = '(\w+)\s(\w+)'
|
|
229
|
+
|
|
230
|
+
threads = 10.times.map do
|
|
231
|
+
Thread.new { RE2.global_replace("one two three four", re, '\2 \1') }
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
expect(threads.map(&:value)).to all(eq("two one four three"))
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
describe ".GlobalReplace" do
|
|
239
|
+
it "is an alias for .global_replace" do
|
|
240
|
+
expect(RE2.GlobalReplace("woo", "o", "a")).to eq("waa")
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
describe ".extract" do
|
|
245
|
+
it "extracts a rewrite of the first match" do
|
|
246
|
+
expect(RE2.extract("alice@example.com", '(\w+)@(\w+)', '\2-\1')).to eq("example-alice")
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
it "returns nil if there is no match" do
|
|
250
|
+
expect(RE2.extract("no match", '(\d+)', '\1')).to be_nil
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
it "supports passing an RE2::Regexp as the pattern" do
|
|
254
|
+
re = RE2::Regexp.new('(\w+)@(\w+)')
|
|
255
|
+
|
|
256
|
+
expect(RE2.extract("alice@example.com", re, '\2-\1')).to eq("example-alice")
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
it "respects any passed RE2::Regexp's flags" do
|
|
260
|
+
re = RE2::Regexp.new('(hello)', case_sensitive: false)
|
|
261
|
+
|
|
262
|
+
expect(RE2.extract("Hello", re, '\1')).to eq("Hello")
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
it "returns UTF-8 strings if the pattern is UTF-8" do
|
|
266
|
+
re = RE2::Regexp.new('(foo)')
|
|
267
|
+
result = RE2.extract("foo", re, '\1')
|
|
268
|
+
|
|
269
|
+
expect(result.encoding.name).to eq("UTF-8")
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
it "returns ISO-8859-1 strings if the pattern is not UTF-8" do
|
|
273
|
+
re = RE2::Regexp.new('(foo)', utf8: false)
|
|
274
|
+
result = RE2.extract("foo", re, '\1')
|
|
275
|
+
|
|
276
|
+
expect(result.encoding.name).to eq("ISO-8859-1")
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
it "returns UTF-8 strings when given a String pattern" do
|
|
280
|
+
result = RE2.extract("foo", '(foo)', '\1')
|
|
281
|
+
|
|
282
|
+
expect(result.encoding.name).to eq("UTF-8")
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
it "supports inputs with null bytes" do
|
|
286
|
+
expect(RE2.extract("ab\0cd", '(a.*d)', '\1')).to eq("ab\0cd")
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
it "supports patterns with null bytes" do
|
|
290
|
+
expect(RE2.extract("ab\0cd", "(b\0c)", '\1')).to eq("b\0c")
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
it "supports rewrites with null bytes" do
|
|
294
|
+
expect(RE2.extract("abcd", '(bc)', "x\0\\1")).to eq("x\0bc")
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
it "supports passing something that can be coerced to a String as input" do
|
|
298
|
+
expect(RE2.extract(StringLike.new("bob123"), '(\d+)', '\1')).to eq("123")
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
it "supports passing something that can be coerced to a String as a pattern" do
|
|
302
|
+
expect(RE2.extract("bob123", StringLike.new('(\d+)'), '\1')).to eq("123")
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
it "supports passing something that can be coerced to a String as a rewrite" do
|
|
306
|
+
expect(RE2.extract("bob123", '(\d+)', StringLike.new('\1'))).to eq("123")
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
it "raises a Type Error for input that can't be converted to String" do
|
|
310
|
+
expect { RE2.extract(0, '(\d+)', '\1') }.to raise_error(TypeError)
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
it "raises a Type Error for a non-RE2::Regexp pattern that can't be converted to String" do
|
|
314
|
+
expect { RE2.extract("woo", 0, '\1') }.to raise_error(TypeError)
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
it "does not leak memory when given a non-String, non-RE2::Regexp pattern" do
|
|
318
|
+
expect { RE2.extract("a" * 128, 0, '\1') }.to raise_error(TypeError)
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
it "raises a Type Error for a rewrite that can't be converted to String" do
|
|
322
|
+
expect { RE2.extract("woo", '(\w+)', 0) }.to raise_error(TypeError)
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
it "can be run concurrently with the same RE2::Regexp pattern" do
|
|
326
|
+
re = RE2::Regexp.new('(\w+)@(\w+)')
|
|
327
|
+
|
|
328
|
+
threads = 10.times.map do
|
|
329
|
+
Thread.new { RE2.extract("alice@example", re, '\2-\1') }
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
expect(threads.map(&:value)).to all(eq("example-alice"))
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
it "can be run concurrently with the same string pattern" do
|
|
336
|
+
re = '(\w+)@(\w+)'
|
|
337
|
+
|
|
338
|
+
threads = 10.times.map do
|
|
339
|
+
Thread.new { RE2.extract("alice@example", re, '\2-\1') }
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
expect(threads.map(&:value)).to all(eq("example-alice"))
|
|
179
343
|
end
|
|
180
344
|
end
|
|
181
345
|
|
|
182
|
-
describe "#
|
|
346
|
+
describe "#escape" do
|
|
183
347
|
it "escapes a string so it can be used as a regular expression" do
|
|
184
|
-
expect(RE2.
|
|
348
|
+
expect(RE2.escape("1.5-2.0?")).to eq('1\.5\-2\.0\?')
|
|
185
349
|
end
|
|
186
350
|
|
|
187
351
|
it "raises a Type Error for input that can't be converted to String" do
|
|
188
|
-
expect { RE2.
|
|
352
|
+
expect { RE2.escape(0) }.to raise_error(TypeError)
|
|
189
353
|
end
|
|
190
354
|
|
|
191
355
|
it "supports passing something that can be coerced to a String as input" do
|
|
192
|
-
expect(RE2.
|
|
356
|
+
expect(RE2.escape(StringLike.new("1.5"))).to eq('1\.5')
|
|
193
357
|
end
|
|
194
358
|
|
|
195
359
|
it "supports strings containing null bytes" do
|
|
196
|
-
expect(RE2.
|
|
360
|
+
expect(RE2.escape("abc\0def")).to eq('abc\x00def')
|
|
361
|
+
end
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
describe ".quote" do
|
|
365
|
+
it "is an alias for .escape" do
|
|
366
|
+
expect(RE2.quote("1.5-2.0?")).to eq('1\.5\-2\.0\?')
|
|
367
|
+
end
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
describe ".QuoteMeta" do
|
|
371
|
+
it "is an alias for .escape" do
|
|
372
|
+
expect(RE2.QuoteMeta("1.5-2.0?")).to eq('1\.5\-2\.0\?')
|
|
197
373
|
end
|
|
198
374
|
end
|
|
199
375
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: re2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.27.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Paul Mucur
|
|
8
8
|
- Stan Hu
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: rake-compiler
|
|
@@ -17,28 +16,28 @@ dependencies:
|
|
|
17
16
|
requirements:
|
|
18
17
|
- - "~>"
|
|
19
18
|
- !ruby/object:Gem::Version
|
|
20
|
-
version: 1.
|
|
19
|
+
version: 1.3.1
|
|
21
20
|
type: :development
|
|
22
21
|
prerelease: false
|
|
23
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
23
|
requirements:
|
|
25
24
|
- - "~>"
|
|
26
25
|
- !ruby/object:Gem::Version
|
|
27
|
-
version: 1.
|
|
26
|
+
version: 1.3.1
|
|
28
27
|
- !ruby/object:Gem::Dependency
|
|
29
28
|
name: rake-compiler-dock
|
|
30
29
|
requirement: !ruby/object:Gem::Requirement
|
|
31
30
|
requirements:
|
|
32
31
|
- - "~>"
|
|
33
32
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: 1.
|
|
33
|
+
version: 1.11.0
|
|
35
34
|
type: :development
|
|
36
35
|
prerelease: false
|
|
37
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
37
|
requirements:
|
|
39
38
|
- - "~>"
|
|
40
39
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: 1.
|
|
40
|
+
version: 1.11.0
|
|
42
41
|
- !ruby/object:Gem::Dependency
|
|
43
42
|
name: rspec
|
|
44
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -59,17 +58,16 @@ dependencies:
|
|
|
59
58
|
requirements:
|
|
60
59
|
- - "~>"
|
|
61
60
|
- !ruby/object:Gem::Version
|
|
62
|
-
version: 2.8.
|
|
61
|
+
version: 2.8.9
|
|
63
62
|
type: :runtime
|
|
64
63
|
prerelease: false
|
|
65
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
66
65
|
requirements:
|
|
67
66
|
- - "~>"
|
|
68
67
|
- !ruby/object:Gem::Version
|
|
69
|
-
version: 2.8.
|
|
68
|
+
version: 2.8.9
|
|
70
69
|
description: Ruby bindings to RE2, "a fast, safe, thread-friendly alternative to backtracking
|
|
71
70
|
regular expression engines like those used in PCRE, Perl, and Python".
|
|
72
|
-
email:
|
|
73
71
|
executables: []
|
|
74
72
|
extensions:
|
|
75
73
|
- ext/re2/extconf.rb
|
|
@@ -90,8 +88,8 @@ files:
|
|
|
90
88
|
- lib/re2/scanner.rb
|
|
91
89
|
- lib/re2/string.rb
|
|
92
90
|
- lib/re2/version.rb
|
|
93
|
-
- ports/archives/
|
|
94
|
-
- ports/archives/re2-
|
|
91
|
+
- ports/archives/20260107.1.tar.gz
|
|
92
|
+
- ports/archives/re2-2025-11-05.tar.gz
|
|
95
93
|
- re2.gemspec
|
|
96
94
|
- spec/kernel_spec.rb
|
|
97
95
|
- spec/re2/match_data_spec.rb
|
|
@@ -105,7 +103,6 @@ homepage: https://github.com/mudge/re2
|
|
|
105
103
|
licenses:
|
|
106
104
|
- BSD-3-Clause
|
|
107
105
|
metadata: {}
|
|
108
|
-
post_install_message:
|
|
109
106
|
rdoc_options: []
|
|
110
107
|
require_paths:
|
|
111
108
|
- lib
|
|
@@ -113,24 +110,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
113
110
|
requirements:
|
|
114
111
|
- - ">="
|
|
115
112
|
- !ruby/object:Gem::Version
|
|
116
|
-
version:
|
|
113
|
+
version: 3.1.0
|
|
117
114
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
115
|
requirements:
|
|
119
116
|
- - ">="
|
|
120
117
|
- !ruby/object:Gem::Version
|
|
121
118
|
version: '0'
|
|
122
119
|
requirements: []
|
|
123
|
-
rubygems_version:
|
|
124
|
-
signing_key:
|
|
120
|
+
rubygems_version: 4.0.6
|
|
125
121
|
specification_version: 4
|
|
126
122
|
summary: Ruby bindings to RE2.
|
|
127
123
|
test_files:
|
|
128
124
|
- ".rspec"
|
|
129
|
-
- spec/spec_helper.rb
|
|
130
|
-
- spec/re2_spec.rb
|
|
131
125
|
- spec/kernel_spec.rb
|
|
132
|
-
- spec/re2/regexp_spec.rb
|
|
133
126
|
- spec/re2/match_data_spec.rb
|
|
134
|
-
- spec/re2/
|
|
135
|
-
- spec/re2/set_spec.rb
|
|
127
|
+
- spec/re2/regexp_spec.rb
|
|
136
128
|
- spec/re2/scanner_spec.rb
|
|
129
|
+
- spec/re2/set_spec.rb
|
|
130
|
+
- spec/re2/string_spec.rb
|
|
131
|
+
- spec/re2_spec.rb
|
|
132
|
+
- spec/spec_helper.rb
|
|
Binary file
|
|
Binary file
|