re2 2.26.2 → 2.28.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 +5 -0
- data/README.md +1 -1
- data/ext/re2/extconf.rb +2 -26
- data/ext/re2/re2.cc +364 -155
- data/lib/re2/version.rb +1 -1
- data/re2.gemspec +1 -1
- data/spec/re2/match_data_spec.rb +90 -2
- data/spec/re2/regexp_spec.rb +85 -5
- data/spec/re2/scanner_spec.rb +9 -0
- data/spec/re2/set_spec.rb +70 -4
- data/spec/re2_spec.rb +60 -0
- 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: e023b89170ec01416f734bfb5ba2fc1f55773d5d2777a6fc9740cedc2fed18df
|
|
4
|
+
data.tar.gz: f89982b19f44f622aa222d62dc28be47c564131f0755a87d2b5e26a8d6abf449
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0951e24aa218e8c1a9204a32888bbe16ce8b693b6afb1c2d068d1acbec01ce6a4e7eebadbff7ec764dceb6129406e401262edd29e8c1268180829d7009b68a7a'
|
|
7
|
+
data.tar.gz: 2a36080a5355f5842d7ddb9c1e5027c3ca823c070524c7dae8d34f4e0574064cd9b3e84232d65476500153b77feabb433bcb59caa4cb1a29821a643c05ea7a7f
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Python".
|
|
|
6
6
|
|
|
7
7
|
[](https://github.com/mudge/re2/actions)
|
|
8
8
|
|
|
9
|
-
**Current version:** 2.
|
|
9
|
+
**Current version:** 2.28.0
|
|
10
10
|
**Bundled RE2 version:** libre2.11 (2025-11-05)
|
|
11
11
|
|
|
12
12
|
```ruby
|
data/ext/re2/extconf.rb
CHANGED
|
@@ -132,38 +132,14 @@ module RE2
|
|
|
132
132
|
|
|
133
133
|
def build_extension
|
|
134
134
|
$CFLAGS << " -Wall -Wextra -funroll-loops"
|
|
135
|
-
$CXXFLAGS << " -Wall -Wextra -funroll-loops"
|
|
135
|
+
$CXXFLAGS << " -Wall -Wextra -funroll-loops -std=c++17"
|
|
136
136
|
|
|
137
137
|
# Pass -x c++ to force gcc to compile the test program
|
|
138
138
|
# as C++ (as it will end in .c by default).
|
|
139
|
-
compile_options = +"-x c++"
|
|
139
|
+
compile_options = +"-x c++ -std=c++17"
|
|
140
140
|
|
|
141
141
|
have_library("stdc++")
|
|
142
142
|
|
|
143
|
-
minimal_program = <<~SRC
|
|
144
|
-
#include <re2/re2.h>
|
|
145
|
-
int main() { return 0; }
|
|
146
|
-
SRC
|
|
147
|
-
|
|
148
|
-
re2_requires_version_flag = checking_for("re2 that requires explicit C++ version flag") do
|
|
149
|
-
!try_compile(minimal_program, compile_options)
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
if re2_requires_version_flag
|
|
153
|
-
# Recent versions of RE2 depend directly on Abseil, which requires a
|
|
154
|
-
# compiler with C++17 support.
|
|
155
|
-
abort "Cannot compile re2 with your compiler: recent versions require C++17 support." unless %w[c++20 c++17 c++11].any? do |std|
|
|
156
|
-
checking_for("re2 that compiles with #{std} standard") do
|
|
157
|
-
if try_compile(minimal_program, compile_options + " -std=#{std}")
|
|
158
|
-
compile_options << " -std=#{std}"
|
|
159
|
-
$CPPFLAGS << " -std=#{std}"
|
|
160
|
-
|
|
161
|
-
true
|
|
162
|
-
end
|
|
163
|
-
end
|
|
164
|
-
end
|
|
165
|
-
end
|
|
166
|
-
|
|
167
143
|
# Determine which version of re2 the user has installed.
|
|
168
144
|
# Revision d9f8806c004d added an `endpos` argument to the
|
|
169
145
|
# generic Match() function.
|