diff --git a/lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb b/lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb index c3c10f37..ea1b0cd7 100644 --- a/lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb +++ b/lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb @@ -44,7 +44,7 @@ def target_sorbet_static_version_from_bundler_lock_file def read_sorbet_static_version_from_bundler_lock_file require "bundler" ::Bundler.locked_gems.specs.find { |spec| spec.name == "sorbet-static" }&.version - rescue LoadError, Bundler::GemfileNotFound + rescue LoadError, ::Bundler::GemfileNotFound nil end end