diff --git a/capybara.gemspec b/capybara.gemspec index d6e09df8..7ed517ad 100644 --- a/capybara.gemspec +++ b/capybara.gemspec @@ -32,7 +32,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency('nokogiri', ['~> 1.8']) s.add_runtime_dependency('rack', ['>= 1.6.0']) s.add_runtime_dependency('rack-test', ['>= 0.6.3']) - s.add_runtime_dependency('regexp_parser', ['~>1.2']) + s.add_runtime_dependency('regexp_parser', ['~>1.5']) s.add_runtime_dependency('xpath', ['~>3.2']) s.add_development_dependency('byebug') unless RUBY_PLATFORM == 'java' diff --git a/lib/capybara/selector/regexp_disassembler.rb b/lib/capybara/selector/regexp_disassembler.rb index 43e3b2f1..02fb3a08 100644 --- a/lib/capybara/selector/regexp_disassembler.rb +++ b/lib/capybara/selector/regexp_disassembler.rb @@ -166,11 +166,11 @@ module Capybara end def min_repeat - @exp.quantifier&.min || 1 + @exp.repetitions.begin end def max_repeat - @exp.quantifier&.max || 1 + @exp.repetitions.end end def fixed_repeat?