summaryrefslogtreecommitdiff
path: root/lib/chef/http.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/http.rb')
-rw-r--r--lib/chef/http.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/http.rb b/lib/chef/http.rb
index 241806da4e..1cb6dcfe25 100644
--- a/lib/chef/http.rb
+++ b/lib/chef/http.rb
@@ -309,7 +309,7 @@ class Chef
# @api private
def create_url(path)
return path if path.is_a?(URI)
- if path =~ /^(http|https|chefzero):\/\//i
+ if path.match?(/^(http|https|chefzero):\/\//i)
URI.parse(path)
elsif path.nil? || path.empty?
URI.parse(@url)