From 0730478a5235e105e3134babaeca56080b609975 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Sun, 28 Apr 2024 16:17:36 +0900 Subject: [PATCH] Use `require_relative` This commit uses `require_relative` instead of `require`. It prevents redundant searches due to the size of `$LOAD_PATH`. --- lib/rubocop/rake_task.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rubocop/rake_task.rb b/lib/rubocop/rake_task.rb index db3ed9c82e9..9c54d92aaeb 100644 --- a/lib/rubocop/rake_task.rb +++ b/lib/rubocop/rake_task.rb @@ -44,7 +44,7 @@ def perform(option) def run_cli(verbose, options) # We lazy-load RuboCop so that the task doesn't dramatically impact the # load time of your Rakefile. - require 'rubocop' + require_relative '../rubocop' cli = CLI.new puts 'Running RuboCop...' if verbose