diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index 7b2596b325..f214d9f2f5 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -317,7 +317,7 @@ module GitHub matches.map do |match| # .sub workaround for GitHub returning preceding / - match["path"] = match["path"].sub(%r{^/}, "") + match["path"] = match["path"].delete_prefix("/") match end end