diff --git a/lib/bundle/brew_dumper.rb b/lib/bundle/brew_dumper.rb index e92c45820..d49ad48f2 100644 --- a/lib/bundle/brew_dumper.rb +++ b/lib/bundle/brew_dumper.rb @@ -25,7 +25,7 @@ def formulae end def formulae_by_full_name(name = nil) - return @formulae_by_full_name[name] if !name.nil? && @formulae_by_full_name&.key?(name) + return @formulae_by_full_name[name] if name.present? && @formulae_by_full_name&.key?(name) require "formula" require "formulary" diff --git a/lib/bundle/brew_installer.rb b/lib/bundle/brew_installer.rb index 2d2a9b746..c7d2d4889 100644 --- a/lib/bundle/brew_installer.rb +++ b/lib/bundle/brew_installer.rb @@ -63,7 +63,7 @@ def install_change_state!(no_upgrade:, verbose:, force:) end def start_service? - !@start_service.nil? + @start_service.present? end def start_service_needed? @@ -71,7 +71,7 @@ def start_service_needed? end def restart_service? - !@restart_service.nil? + @restart_service.present? end def restart_service_needed? @@ -82,7 +82,7 @@ def restart_service_needed? end def changed? - !@changed.nil? + @changed.present? end def service_change_state!(verbose:)