diff --git a/Library/Homebrew/cask/quarantine.rb b/Library/Homebrew/cask/quarantine.rb index 6af81b6aeb..4a36a5128e 100644 --- a/Library/Homebrew/cask/quarantine.rb +++ b/Library/Homebrew/cask/quarantine.rb @@ -216,11 +216,11 @@ module Cask # including both file ownership and whether system permissions are granted. # Here we just want to check whether sudo would be needed. looks_writable_without_sudo = if app.owned? - (app.lstat.mode & 0200) != 0 + app.lstat.mode.anybits?(0200) elsif app.grpowned? - (app.lstat.mode & 0020) != 0 + app.lstat.mode.anybits?(0020) else - (app.lstat.mode & 0002) != 0 + app.lstat.mode.anybits?(0002) end if looks_writable_without_sudo diff --git a/Library/Homebrew/utils/pypi.rb b/Library/Homebrew/utils/pypi.rb index 28b5b847aa..083108b28a 100644 --- a/Library/Homebrew/utils/pypi.rb +++ b/Library/Homebrew/utils/pypi.rb @@ -272,7 +272,7 @@ module PyPI else stable = T.must(formula.stable) url = if stable.specs[:tag].present? - url = "git+#{stable.url}@#{stable.specs[:tag]}" + "git+#{stable.url}@#{stable.specs[:tag]}" else stable.url end