diff --git a/.rubocop.yml b/.rubocop.yml index 62416515..02b83353 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -5,7 +5,7 @@ AllCops: - '**/*.rake' - 'Gemfile' - 'Gemfile.triage' - TargetRubyVersion: 3.1 + TargetRubyVersion: 3.2 Exclude: - tmp/**/* - vendor/**/* diff --git a/bin/corpus b/bin/corpus index b7dc73f9..651572a4 100755 --- a/bin/corpus +++ b/bin/corpus @@ -197,8 +197,8 @@ module Unparser # Unparser corpus CLI implementation class CLI - def self.run(*arguments) - new(*arguments).exit_status + def self.run(*) + new(*).exit_status end def initialize(arguments) diff --git a/lib/unparser.rb b/lib/unparser.rb index 5616f888..9dba8d95 100644 --- a/lib/unparser.rb +++ b/lib/unparser.rb @@ -3,7 +3,6 @@ require 'diff/lcs' require 'diff/lcs/hunk' require 'optparse' -require 'set' require 'unparser/equalizer' require 'unparser/adamantium' diff --git a/lib/unparser/ast/local_variable_scope.rb b/lib/unparser/ast/local_variable_scope.rb index 8edaf10e..ca2782c2 100644 --- a/lib/unparser/ast/local_variable_scope.rb +++ b/lib/unparser/ast/local_variable_scope.rb @@ -107,8 +107,8 @@ def initialize(stack:) end # Enumerate each node with its local variable scope - def self.each(node:, stack:, &block) - new(stack: stack).each(node: node, &block) + def self.each(node:, stack:, &) + new(stack: stack).each(node: node, &) end # Enumerate local variable scope scope @@ -121,8 +121,8 @@ def self.each(node:, stack:, &block) # # @api private # - def each(node:, &block) - visit(node, &block) + def each(node:, &) + visit(node, &) end private diff --git a/lib/unparser/cli.rb b/lib/unparser/cli.rb index 36402026..7a155990 100644 --- a/lib/unparser/cli.rb +++ b/lib/unparser/cli.rb @@ -63,8 +63,8 @@ def literal_validation # @api private # # mutant:disable - def self.run(*arguments) - new(*arguments).exit_status + def self.run(*) + new(*).exit_status end # Initialize object diff --git a/lib/unparser/comments.rb b/lib/unparser/comments.rb index 5a7696bd..9234b88c 100644 --- a/lib/unparser/comments.rb +++ b/lib/unparser/comments.rb @@ -15,8 +15,8 @@ class Comments # # @api private # - def source_range(*arguments) - self.class.source_range(*arguments) + def source_range(*) + self.class.source_range(*) end # Initialize object diff --git a/spec/unit/unparser_spec.rb b/spec/unit/unparser_spec.rb index a2499ee1..be2a082a 100644 --- a/spec/unit/unparser_spec.rb +++ b/spec/unit/unparser_spec.rb @@ -475,7 +475,7 @@ def foo(bar) ) end - if RUBY_VERSION < '3.1.' + if RUBY_VERSION < '3.2.' excludes.concat( %w[ test/corpus/literal/since/31.rb diff --git a/unparser.gemspec b/unparser.gemspec index 7c0ac193..3edbc02c 100644 --- a/unparser.gemspec +++ b/unparser.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |gem| gem.extra_rdoc_files = %w[README.md] gem.executables = %w[unparser] - gem.required_ruby_version = '>= 3.1' + gem.required_ruby_version = '>= 3.2' gem.add_dependency('diff-lcs', '~> 1.6') gem.add_dependency('parser', '>= 3.3.0')