From ee2a752c27b2ff8f6870fafb8e49d1b5199af51c Mon Sep 17 00:00:00 2001 From: Matijs van Zuijlen Date: Mon, 30 Dec 2024 13:36:28 +0100 Subject: [PATCH] Support Ruby 3.1 through 3.4 This drops support for Ruby 3.0 which is EOL. --- .github/workflows/ruby.yml | 2 +- .rubocop.yml | 2 +- lib/reek/context/code_context.rb | 4 ++-- reek.gemspec | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 9b82f0e9c..7ec9dc4e4 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: - ruby: ["3.0", "3.1", "3.2", "jruby-9.4", "3.3"] + ruby: ["3.1", "3.2", "jruby-9.4", "3.3", "3.4"] steps: - uses: actions/checkout@v4 diff --git a/.rubocop.yml b/.rubocop.yml index 154500eec..ce648e4ed 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -12,7 +12,7 @@ AllCops: Exclude: - 'samples/**/*' NewCops: enable - TargetRubyVersion: 3.0 + TargetRubyVersion: 3.1 # Tables are nice Layout/HashAlignment: diff --git a/lib/reek/context/code_context.rb b/lib/reek/context/code_context.rb index 1b7183bd0..83ac83272 100644 --- a/lib/reek/context/code_context.rb +++ b/lib/reek/context/code_context.rb @@ -38,9 +38,9 @@ def initialize(exp) # @param type [Symbol] the type of the nodes we are looking for, e.g. :defs. # @yield block that is executed for every node. # - def local_nodes(type, ignored = [], &blk) + def local_nodes(type, ignored = [], &) ignored |= [:class, :module] - exp.each_node(type, ignored, &blk) + exp.each_node(type, ignored, &) end # Iterate over `self` and child contexts. diff --git a/reek.gemspec b/reek.gemspec index 39b7f55d8..d9f84def9 100644 --- a/reek.gemspec +++ b/reek.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^bin/}).map { |path| File.basename(path) } spec.rdoc_options = %w(--main README.md -x assets/|bin/|config/|features/|spec/|tasks/) - spec.required_ruby_version = '>= 3.0.0' + spec.required_ruby_version = '>= 3.1.0' spec.metadata = { 'homepage_uri' => 'https://github.com/troessner/reek',