From 3f2afc0eb2d62bbd46fc8ad85dfdb0631b527f4b Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 18 Dec 2020 13:47:57 +0000 Subject: [PATCH] utils/github: tweak search_code style. As suggested by reitermarkus in https://github.com/Homebrew/brew/pull/10055#discussion_r545829663 --- Library/Homebrew/utils/github.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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