From 7c0b30008d9d0c7aee9270ab0cbc6ead5bcc59f0 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Fri, 8 Mar 2024 18:08:02 +0100 Subject: [PATCH] Remove a workaround for older RuboCop versions The minimal supported version is currently 1.61 --- lib/rubocop/minitest/assert_offense.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/rubocop/minitest/assert_offense.rb b/lib/rubocop/minitest/assert_offense.rb index 414ab42..b891666 100644 --- a/lib/rubocop/minitest/assert_offense.rb +++ b/lib/rubocop/minitest/assert_offense.rb @@ -187,14 +187,8 @@ def parse_source!(source, file = nil) end processed_source = RuboCop::ProcessedSource.new(source, ruby_version, file, parser_engine: parser_engine) - - # Follow up https://github.com/rubocop/rubocop/pull/10987. - # When support for RuboCop 1.37.1 ends, this condition can be removed. - if processed_source.respond_to?(:config) && processed_source.respond_to?(:registry) - processed_source.config = configuration - processed_source.registry = registry - end - + processed_source.config = configuration + processed_source.registry = registry processed_source end