diff --git a/Changelog.md b/Changelog.md index 50f7e1766..efd9869fb 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,9 @@ +# v0.11.27 2023-12-01 + +* [#1414](https://github.com/mbj/mutant/pull/1414) + + Update to parser-3.3.0 dependency. + # v0.11.26 2023-12-01 * [#1409](https://github.com/mbj/mutant/pull/1409) diff --git a/Gemfile.lock b/Gemfile.lock index 25be6e46f..64fac9fe8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,9 +1,9 @@ PATH remote: . specs: - mutant (0.11.26) + mutant (0.11.27) diff-lcs (~> 1.3) - parser (~> 3.2.2, >= 3.2.2.4) + parser (~> 3.3.0) regexp_parser (~> 2.8.2) sorbet-runtime (~> 0.5.0) unparser (~> 0.6.9) @@ -17,17 +17,16 @@ GEM remote: https://rubygems.org/ specs: ast (2.4.2) - base64 (0.1.1) diff-lcs (1.5.0) - json (2.6.3) + json (2.7.1) language_server-protocol (3.17.0.3) - parallel (1.23.0) - parser (3.2.2.4) + parallel (1.24.0) + parser (3.3.0.2) ast (~> 2.4.1) racc - racc (1.7.1) + racc (1.7.3) rainbow (3.1.1) - regexp_parser (2.8.2) + regexp_parser (2.8.3) rexml (3.2.6) rspec (3.12.0) rspec-core (~> 3.12.0) @@ -45,24 +44,23 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.56.4) - base64 (~> 0.1.1) + rubocop (1.59.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.2.3) + parser (>= 3.2.2.4) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.1, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.29.0) + rubocop-ast (1.30.0) parser (>= 3.2.1.0) ruby-progressbar (1.13.0) - sorbet-runtime (0.5.11064) + sorbet-runtime (0.5.11180) unicode-display_width (2.5.0) - unparser (0.6.9) + unparser (0.6.12) diff-lcs (~> 1.3) parser (>= 3.2.2.4) diff --git a/lib/mutant/mutator/node/send.rb b/lib/mutant/mutator/node/send.rb index ef9ec92fb..2edbca864 100644 --- a/lib/mutant/mutator/node/send.rb +++ b/lib/mutant/mutator/node/send.rb @@ -206,6 +206,7 @@ def emit_naked_receiver emit(receiver) if receiver && !left_op_assignment? end + # rubocop:disable Style/HashEachMethods - its not a hash ;) def mutate_arguments emit_type(receiver, selector) remaining_children_with_index.each do |_node, index| diff --git a/lib/mutant/version.rb b/lib/mutant/version.rb index c65b568ba..8cce2e534 100644 --- a/lib/mutant/version.rb +++ b/lib/mutant/version.rb @@ -2,5 +2,5 @@ module Mutant # Current mutant version - VERSION = '0.11.26' + VERSION = '0.11.27' end # Mutant diff --git a/meta/def.rb b/meta/def.rb index d95feb7f1..44cde4776 100644 --- a/meta/def.rb +++ b/meta/def.rb @@ -230,35 +230,37 @@ mutation 'def foo(**); {}; end' end - Mutant::Meta::Example.add :hash do - source 'def foo(**); bar { { ** } }; end' - - mutation 'def foo(**); bar { nil }; end' - mutation 'def foo(**); bar { raise }; end' - mutation 'def foo(**); bar { {} }; end' - mutation 'def foo(**); bar { }; end' - mutation 'def foo(**); bar; end' - mutation 'def foo(**); end' - mutation 'def foo(**); nil; end' - mutation 'def foo(**); raise; end' - mutation 'def foo(**); super; end' - mutation 'def foo(**); { ** }; end' - end - - Mutant::Meta::Example.add :hash do - source 'def foo(*); bar { boz(*) }; end' - - mutation 'def foo(*); bar { boz }; end' - mutation 'def foo(*); bar { nil }; end' - mutation 'def foo(*); bar { raise }; end' - mutation 'def foo(*); bar { }; end' - mutation 'def foo(*); bar.boz(*); end' - mutation 'def foo(*); bar; end' - mutation 'def foo(*); boz(*); end' - mutation 'def foo(*); end' - mutation 'def foo(*); nil; end' - mutation 'def foo(*); raise; end' - mutation 'def foo(*); super; end' + if RUBY_VERSION <= '3.3' + Mutant::Meta::Example.add :hash do + source 'def foo(**); bar { { ** } }; end' + + mutation 'def foo(**); bar { nil }; end' + mutation 'def foo(**); bar { raise }; end' + mutation 'def foo(**); bar { {} }; end' + mutation 'def foo(**); bar { }; end' + mutation 'def foo(**); bar; end' + mutation 'def foo(**); end' + mutation 'def foo(**); nil; end' + mutation 'def foo(**); raise; end' + mutation 'def foo(**); super; end' + mutation 'def foo(**); { ** }; end' + end + + Mutant::Meta::Example.add :hash do + source 'def foo(*); bar { boz(*) }; end' + + mutation 'def foo(*); bar { boz }; end' + mutation 'def foo(*); bar { nil }; end' + mutation 'def foo(*); bar { raise }; end' + mutation 'def foo(*); bar { }; end' + mutation 'def foo(*); bar.boz(*); end' + mutation 'def foo(*); bar; end' + mutation 'def foo(*); boz(*); end' + mutation 'def foo(*); end' + mutation 'def foo(*); nil; end' + mutation 'def foo(*); raise; end' + mutation 'def foo(*); super; end' + end end end diff --git a/mutant.gemspec b/mutant.gemspec index c002a2ad9..0d66793c5 100644 --- a/mutant.gemspec +++ b/mutant.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |gem| gem.required_ruby_version = '>= 3.0' gem.add_runtime_dependency('diff-lcs', '~> 1.3') - gem.add_runtime_dependency('parser', '~> 3.2.2', '>= 3.2.2.4') + gem.add_runtime_dependency('parser', '~> 3.3.0') 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') diff --git a/test_app/Gemfile.minitest.lock b/test_app/Gemfile.minitest.lock index 9908fab63..7d6ddf8dd 100644 --- a/test_app/Gemfile.minitest.lock +++ b/test_app/Gemfile.minitest.lock @@ -1,15 +1,15 @@ PATH remote: .. specs: - mutant (0.11.26) + mutant (0.11.27) diff-lcs (~> 1.3) - parser (~> 3.2.2, >= 3.2.2.4) + parser (~> 3.3.0) regexp_parser (~> 2.8.2) sorbet-runtime (~> 0.5.0) unparser (~> 0.6.9) - mutant-minitest (0.11.26) + mutant-minitest (0.11.27) minitest (~> 5.11) - mutant (= 0.11.26) + mutant (= 0.11.27) GEM remote: https://oss:Px2ENN7S91OmWaD5G7MIQJi1dmtmYrEh@gem.mutant.dev/ @@ -22,7 +22,7 @@ GEM ast (2.4.2) diff-lcs (1.5.0) minitest (5.17.0) - parser (3.2.2.4) + parser (3.3.0.2) ast (~> 2.4.1) racc racc (1.7.1) diff --git a/test_app/Gemfile.rspec3.8.lock b/test_app/Gemfile.rspec3.8.lock index f481ad189..c6cfcc017 100644 --- a/test_app/Gemfile.rspec3.8.lock +++ b/test_app/Gemfile.rspec3.8.lock @@ -1,14 +1,14 @@ PATH remote: .. specs: - mutant (0.11.26) + mutant (0.11.27) diff-lcs (~> 1.3) - parser (~> 3.2.2, >= 3.2.2.4) + parser (~> 3.3.0) regexp_parser (~> 2.8.2) sorbet-runtime (~> 0.5.0) unparser (~> 0.6.9) - mutant-rspec (0.11.26) - mutant (= 0.11.26) + mutant-rspec (0.11.27) + mutant (= 0.11.27) rspec-core (>= 3.8.0, < 4.0.0) GEM @@ -27,7 +27,7 @@ GEM ice_nine (0.11.2) memoizable (0.4.2) thread_safe (~> 0.3, >= 0.3.1) - parser (3.2.2.4) + parser (3.3.0.2) ast (~> 2.4.1) racc racc (1.7.1)