summaryrefslogtreecommitdiff
path: root/lib/chef/monkey_patches
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/monkey_patches')
-rw-r--r--lib/chef/monkey_patches/net_http.rb2
-rw-r--r--lib/chef/monkey_patches/win32/registry.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/monkey_patches/net_http.rb b/lib/chef/monkey_patches/net_http.rb
index 775568639b..e1a65a369c 100644
--- a/lib/chef/monkey_patches/net_http.rb
+++ b/lib/chef/monkey_patches/net_http.rb
@@ -9,7 +9,7 @@ unless defined?(Net::HTTPClientException)
Net::HTTPClientException = Net::HTTPServerException
end
-require "net/http"
+require "net/http" unless defined?(Net::HTTP)
module Net
class HTTPError
include ChefNetHTTPExceptionExtensions
diff --git a/lib/chef/monkey_patches/win32/registry.rb b/lib/chef/monkey_patches/win32/registry.rb
index 38dd220727..c4f369d17c 100644
--- a/lib/chef/monkey_patches/win32/registry.rb
+++ b/lib/chef/monkey_patches/win32/registry.rb
@@ -17,7 +17,7 @@
require_relative "../../win32/api/registry"
require_relative "../../win32/unicode"
-require "win32/registry"
+require "win32/registry" unless defined?(Win32::Registry)
module Win32
class Registry