From 299378785d5f816f0c9cde1200324f99453e1acd Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Tue, 1 Dec 2020 09:23:33 +0100 Subject: [PATCH] EmHttp adapter: drop superfluous loaded? check We are loaded in this section. --- lib/faraday/adapter/em_http.rb | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/lib/faraday/adapter/em_http.rb b/lib/faraday/adapter/em_http.rb index c7dd73876..4d30b375c 100644 --- a/lib/faraday/adapter/em_http.rb +++ b/lib/faraday/adapter/em_http.rb @@ -93,17 +93,15 @@ def request_options(env) dependency do require 'em-http' - if Faraday::Adapter::EMHttp.loaded? - begin - require 'openssl' - rescue LoadError - warn 'Warning: no such file to load -- openssl. ' \ - 'Make sure it is installed if you want HTTPS support' - else - require 'em-http/version' - if EventMachine::HttpRequest::VERSION < '1.1.6' - require 'faraday/adapter/em_http_ssl_patch' - end + begin + require 'openssl' + rescue LoadError + warn 'Warning: no such file to load -- openssl. ' \ + 'Make sure it is installed if you want HTTPS support' + else + require 'em-http/version' + if EventMachine::HttpRequest::VERSION < '1.1.6' + require 'faraday/adapter/em_http_ssl_patch' end end end