From f7113bf8cd9982c14d0bea9d3ba1a00215c03e8a Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Wed, 11 Oct 2023 02:15:10 +0000 Subject: [PATCH] Upgrade regexp_parser --- Gemfile.lock | 4 ++-- lib/mutant/mutator/regexp.rb | 2 +- mutant.gemspec | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 60d453f03..28a95328c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,7 +4,7 @@ PATH mutant (0.11.23) diff-lcs (~> 1.3) parser (~> 3.2.2, >= 3.2.2.4) - regexp_parser (~> 2.6.1) + regexp_parser (~> 2.8.2) sorbet-runtime (~> 0.5.0) unparser (~> 0.6.9) @@ -27,7 +27,7 @@ GEM racc racc (1.7.1) rainbow (3.1.1) - regexp_parser (2.6.2) + regexp_parser (2.8.2) rexml (3.2.6) rspec (3.12.0) rspec-core (~> 3.12.0) diff --git a/lib/mutant/mutator/regexp.rb b/lib/mutant/mutator/regexp.rb index 74af7eb42..d41820793 100644 --- a/lib/mutant/mutator/regexp.rb +++ b/lib/mutant/mutator/regexp.rb @@ -103,7 +103,7 @@ def emit_removal end def emit_replacement - new_text = MAP[input.quantifier.text] + new_text = MAP[input.quantifier.text] or return emit(mk_dup.tap { |new| new.quantifier.text = new_text }) end diff --git a/mutant.gemspec b/mutant.gemspec index 026462218..ebd303def 100644 --- a/mutant.gemspec +++ b/mutant.gemspec @@ -26,7 +26,7 @@ Gem::Specification.new do |gem| gem.add_runtime_dependency('diff-lcs', '~> 1.3') gem.add_runtime_dependency('parser', '~> 3.2.2', '>= 3.2.2.4') - gem.add_runtime_dependency('regexp_parser', '~> 2.6.1') + gem.add_runtime_dependency('regexp_parser', '~> 2.8.2') gem.add_runtime_dependency('sorbet-runtime', '~> 0.5.0') gem.add_runtime_dependency('unparser', '~> 0.6.9')