diff options
Diffstat (limited to 'lib/chef/http/http_request.rb')
-rw-r--r-- | lib/chef/http/http_request.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/http/http_request.rb b/lib/chef/http/http_request.rb index 99a9a84d4e..9569c4133a 100644 --- a/lib/chef/http/http_request.rb +++ b/lib/chef/http/http_request.rb @@ -128,7 +128,7 @@ class Chef rescue NoMethodError => e # http://redmine.ruby-lang.org/issues/show/2708 # http://redmine.ruby-lang.org/issues/show/2758 - if e.to_s =~ /#{Regexp.escape(%q{undefined method `closed?' for nil:NilClass})}/ + if /#{Regexp.escape(%q{undefined method `closed?' for nil:NilClass})}/.match?(e.to_s) Chef::Log.trace("Rescued error in http connect, re-raising as Errno::ECONNREFUSED to hide bug in net/http") Chef::Log.trace("#{e.class.name}: #{e}") Chef::Log.trace(e.backtrace.join("\n")) |