Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove namespace workaround from homebrew-fork #8437

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions lib/homebrew-fork/Library/Homebrew/utils/github.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,24 +138,4 @@ def private_repo?(user, repo)
uri = URI.parse("https://api.github.com/repos/#{user}/#{repo}")
open(uri) { |json| json["private"] }
end

private

# If the zlib formula is loaded, TypeError will be raised when we try to load
# net/https. This monkeypatch prevents that and lets Net::HTTP fall back to
# the non-gzip codepath.
def safely_load_net_https
return if defined?(Net::HTTP)
if defined?(Zlib) && RUBY_VERSION >= "1.9"
require "net/protocol"
http = Class.new(Net::Protocol) do
def self.require(lib)
raise LoadError if lib == "zlib"
super
end
end
Net.const_set(:HTTP, http)
end
require "net/https"
end
end