From c73b9b90c65ef052e204e3d52b00ef5c1de7ddd8 Mon Sep 17 00:00:00 2001 From: Roland Walker Date: Fri, 26 Dec 2014 13:20:57 -0500 Subject: [PATCH] remove namespace workaround from homebrew-fork irrelevant since we don't load Formulae --- .../Library/Homebrew/utils/github.rb | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/lib/homebrew-fork/Library/Homebrew/utils/github.rb b/lib/homebrew-fork/Library/Homebrew/utils/github.rb index 173cdc54600ec..a0c77f1cddf33 100644 --- a/lib/homebrew-fork/Library/Homebrew/utils/github.rb +++ b/lib/homebrew-fork/Library/Homebrew/utils/github.rb @@ -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