regexp_parser 2.6.2 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -37,7 +37,6 @@ module Regexp::Syntax
37
37
  return Regexp::Syntax::Any if ['*', 'any'].include?(version.to_s)
38
38
 
39
39
  version =~ VERSION_REGEXP || raise(InvalidVersionNameError, version)
40
- warn_if_future_version(version)
41
40
  version_const_name = "V#{version.to_s.scan(/\d+/).join('_')}"
42
41
  const_get(version_const_name) || raise(UnknownSyntaxNameError, version)
43
42
  end
@@ -63,11 +62,4 @@ module Regexp::Syntax
63
62
  # add .99 to treat versions without a patch value as latest patch version
64
63
  Gem::Version.new((name.to_s.scan(/\d+/) << 99).join('.'))
65
64
  end
66
-
67
- def warn_if_future_version(const_name)
68
- return if comparable(const_name) < comparable('4.0.0')
69
-
70
- warn('This library has only been tested up to Ruby 3.x, '\
71
- "but you are running with #{const_name}")
72
- end
73
65
  end
@@ -4,3 +4,5 @@
4
4
  # Aliases for the latest patch version are provided as 'ruby/n.n',
5
5
  # e.g. 'ruby/1.9' refers to Ruby v1.9.3.
6
6
  Dir[File.expand_path('../versions/*.rb', __FILE__)].sort.each { |f| require f }
7
+
8
+ Regexp::Syntax::CURRENT = Regexp::Syntax.for("ruby/#{RUBY_VERSION}")
@@ -1,5 +1,5 @@
1
1
  class Regexp
2
2
  class Parser
3
- VERSION = '2.6.2'
3
+ VERSION = '2.7.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: regexp_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.2
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ammar Ali
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-19 00:00:00.000000000 Z
11
+ date: 2023-02-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A library for tokenizing, lexing, and parsing Ruby regular expressions.
14
14
  email:
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  requirements: []
128
- rubygems_version: 3.3.3
128
+ rubygems_version: 3.4.1
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Scanner, lexer, parser for ruby's regular expressions