re2 2.5.0-x64-mingw32 → 2.6.0.rc1-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17ba6bc7fbfed13bbfa8757a410fe4f6395973ac36c25ee9852d85b61b75207c
4
- data.tar.gz: 4cbf8e33a25cb7f126bcd900bb4772f48a9abcf4165d4beedb69afc3030bebc0
3
+ metadata.gz: a44202615d59beeffed6b5f1c14faae65da7bf06bb6070cc77483d5e25f65a37
4
+ data.tar.gz: 5486b97f8b3f2e23c0bd09f080f835806fa1b525f32dfbafab3135c252006355
5
5
  SHA512:
6
- metadata.gz: cb58ea307074b9303df496a9925ff242797cca2c3c8a5562540cb7cb2929a2c95dd22865df51a5221106043c6be466866a6e3b64e38126495b8a1a3926bbe7a8
7
- data.tar.gz: 1e9b67210b4ecc206c94eeba6de1661713f69e8cfa6e1dbb95b7e10d8c681ab9944ae73b8257a391d7e05b422580d0fb8bbc1bf9eb4c0cfe0c9451f40a4627c6
6
+ metadata.gz: 89639209f2dd54229a353c70e237845775800889bcb59a06a21f9177698fc16009796ae95ce0cca3e2559eefdb3bad3127b281454568562b8089c7fe7fc04a7b
7
+ data.tar.gz: 466f5a77412cb83596e3f69f9f62093987bf94ceac77e8eb76da74e08f88df1b9b39377571c8e829ce8aa04b95339c17d6b882487c50dcfd9d2db575f793f3a6
data/README.md CHANGED
@@ -1,9 +1,11 @@
1
- # re2 [![Build Status](https://github.com/mudge/re2/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/mudge/re2/actions)
1
+ # re2 - safer regular expressions in Ruby
2
2
 
3
3
  Ruby bindings to [RE2][], a "fast, safe, thread-friendly alternative to
4
4
  backtracking regular expression engines like those used in PCRE, Perl, and
5
5
  Python".
6
6
 
7
+ [![Build Status](https://github.com/mudge/re2/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/mudge/re2/actions)
8
+
7
9
  **Current version:** 2.5.0
8
10
  **Bundled RE2 version:** libre2.11 (2023-11-01)
9
11
 
@@ -37,6 +39,17 @@ RE2('(\w+):(\d+)').full_match("ruby:1234")
37
39
 
38
40
  ## Why RE2?
39
41
 
42
+ While [recent
43
+ versions](https://www.ruby-lang.org/en/news/2022/12/25/ruby-3-2-0-released/) of
44
+ Ruby have improved defences against [regular expression denial of service
45
+ (ReDoS) attacks](https://en.wikipedia.org/wiki/ReDoS), it is still possible for
46
+ users to craft malicious patterns that take a long time to process by using
47
+ syntactic features such as [back-references, lookaheads and possessive
48
+ quantifiers](https://bugs.ruby-lang.org/issues/19104#note-3). RE2 aims to
49
+ eliminate ReDoS by design:
50
+
51
+ > **_Safety is RE2's raison d'être._**
52
+ >
40
53
  > RE2 was designed and implemented with an explicit goal of being able to
41
54
  > handle regular expressions from untrusted users without risk. One of its
42
55
  > primary guarantees is that the match time is linear in the length of the
@@ -110,7 +123,7 @@ See the API documentation for [`RE2::Regexp#initialize`](https://mudge.name/re2/
110
123
 
111
124
  ### Matching interface
112
125
 
113
- There are two main methods for matching: [`RE2::Regexp#full_match?`](https://mudge.name/re2/RE2/Regexp.html#full_match%3F-instance_method) requires the regular expression to match the entire input text, and [`RE2::Regexp#partial_match?`](https://mudge.name/re2/RE2/Regexp.html#match%3F-instance_method) looks for a match for a substring of the input text, returning a boolean to indicate whether a match was successful or not.
126
+ There are two main methods for matching: [`RE2::Regexp#full_match?`](https://mudge.name/re2/RE2/Regexp.html#full_match%3F-instance_method) requires the regular expression to match the entire input text, and [`RE2::Regexp#partial_match?`](https://mudge.name/re2/RE2/Regexp.html#partial_match%3F-instance_method) looks for a match for a substring of the input text, returning a boolean to indicate whether a match was successful or not.
114
127
 
115
128
  ```ruby
116
129
  RE2('h.*o').full_match?("hello") #=> true
data/Rakefile CHANGED
@@ -33,7 +33,7 @@ Gem::PackageTask.new(RE2_GEM_SPEC) do |p|
33
33
  p.need_tar = false
34
34
  end
35
35
 
36
- CROSS_RUBY_VERSIONS = %w[3.2.0 3.1.0 3.0.0 2.7.0 2.6.0].join(':')
36
+ CROSS_RUBY_VERSIONS = %w[3.3.0 3.2.0 3.1.0 3.0.0 2.7.0 2.6.0].join(':')
37
37
  CROSS_RUBY_PLATFORMS = %w[
38
38
  aarch64-linux
39
39
  arm-linux
data/ext/re2/re2.cc CHANGED
@@ -1588,7 +1588,7 @@ static VALUE re2_regexp_full_match_p(const VALUE self, VALUE text) {
1588
1588
  *
1589
1589
  * @param [text] text the text to scan incrementally
1590
1590
  * @return [RE2::Scanner] an `Enumerable` {RE2::Scanner} object
1591
- * @raises [TypeError] if `text` cannot be coerced to a `String`
1591
+ * @raise [TypeError] if `text` cannot be coerced to a `String`
1592
1592
  * @example
1593
1593
  * c = RE2::Regexp.new('(\w+)').scan("Foo bar baz")
1594
1594
  * #=> #<RE2::Scanner:0x0000000000000001>
@@ -1652,7 +1652,7 @@ static VALUE re2_regexp_match_has_endpos_argument_p(VALUE) {
1652
1652
  * @param [String, RE2::Regexp] pattern a regexp matching text to be replaced
1653
1653
  * @param [String] rewrite the string to replace with
1654
1654
  * @return [String] the resulting string
1655
- * @raises [TypeError] if the given rewrite or pattern (if not provided as a
1655
+ * @raise [TypeError] if the given rewrite or pattern (if not provided as a
1656
1656
  * {RE2::Regexp}) cannot be coerced to `String`s
1657
1657
  * @example
1658
1658
  * RE2.Replace("hello there", "hello", "howdy") #=> "howdy there"
@@ -1700,7 +1700,7 @@ static VALUE re2_Replace(VALUE, VALUE str, VALUE pattern,
1700
1700
  * @param [String] str the string to modify
1701
1701
  * @param [String, RE2::Regexp] pattern a regexp matching text to be replaced
1702
1702
  * @param [String] rewrite the string to replace with
1703
- * @raises [TypeError] if the given rewrite or pattern (if not provided as a
1703
+ * @raise [TypeError] if the given rewrite or pattern (if not provided as a
1704
1704
  * {RE2::Regexp}) cannot be coerced to `String`s
1705
1705
  * @return [String] the resulting string
1706
1706
  * @example
@@ -1745,7 +1745,7 @@ static VALUE re2_GlobalReplace(VALUE, VALUE str, VALUE pattern,
1745
1745
  * exactly match the original string.
1746
1746
  *
1747
1747
  * @param [String] unquoted the unquoted string
1748
- * @raises [TypeError] if the given unquoted string cannot be coerced to a `String`
1748
+ * @raise [TypeError] if the given unquoted string cannot be coerced to a `String`
1749
1749
  * @return [String] the escaped string
1750
1750
  * @example
1751
1751
  * RE2::Regexp.escape("1.5-2.0?") #=> "1\.5\-2\.0\?"
data/lib/2.6/re2.so CHANGED
Binary file
data/lib/2.7/re2.so CHANGED
Binary file
data/lib/3.0/re2.so CHANGED
Binary file
data/lib/re2/regexp.rb CHANGED
@@ -6,6 +6,7 @@
6
6
  # Copyright (c) 2010, Paul Mucur (https://mudge.name)
7
7
  # Released under the BSD Licence, please see LICENSE.txt
8
8
 
9
+
9
10
  module RE2
10
11
  class Regexp
11
12
  # Match the pattern against any substring of the given `text` and return a
data/lib/re2/scanner.rb CHANGED
@@ -6,6 +6,7 @@
6
6
  # Copyright (c) 2010, Paul Mucur (https://mudge.name)
7
7
  # Released under the BSD Licence, please see LICENSE.txt
8
8
 
9
+
9
10
  module RE2
10
11
  class Scanner
11
12
  include Enumerable
data/lib/re2/string.rb CHANGED
@@ -9,6 +9,7 @@
9
9
  require "re2"
10
10
 
11
11
  module RE2
12
+ # @deprecated Use methods on {RE2} and {RE2::Regexp} instead.
12
13
  module String
13
14
  # @deprecated Use {RE2.Replace} instead.
14
15
  def re2_sub(*args)
data/lib/re2/version.rb CHANGED
@@ -8,6 +8,7 @@
8
8
  # Copyright (c) 2010, Paul Mucur (https://mudge.name)
9
9
  # Released under the BSD Licence, please see LICENSE.txt
10
10
 
11
+
11
12
  module RE2
12
- VERSION = "2.5.0"
13
+ VERSION = "2.6.0.rc1"
13
14
  end
data/re2.gemspec CHANGED
@@ -38,8 +38,8 @@ Gem::Specification.new do |s|
38
38
  "spec/re2/set_spec.rb",
39
39
  "spec/re2/scanner_spec.rb"
40
40
  ]
41
- s.add_development_dependency("rake-compiler", "~> 1.2.1")
42
- s.add_development_dependency("rake-compiler-dock", "~> 1.3.0")
41
+ s.add_development_dependency("rake-compiler", "~> 1.2.5")
42
+ s.add_development_dependency("rake-compiler-dock", "~> 1.4.0.rc2")
43
43
  s.add_development_dependency("rspec", "~> 3.2")
44
44
  s.add_runtime_dependency("mini_portile2", "~> 2.8.5") # keep version in sync with extconf.rb
45
45
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: re2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.6.0.rc1
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Paul Mucur
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-12-05 00:00:00.000000000 Z
12
+ date: 2023-12-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler
@@ -17,28 +17,28 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 1.2.1
20
+ version: 1.2.5
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 1.2.1
27
+ version: 1.2.5
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake-compiler-dock
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 1.3.0
34
+ version: 1.4.0.rc2
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 1.3.0
41
+ version: 1.4.0.rc2
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rspec
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -105,9 +105,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
105
105
  version: 3.1.dev
106
106
  required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - ">"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: 1.3.1
111
111
  requirements: []
112
112
  rubygems_version: 3.3.26
113
113
  signing_key: