lib/async/http/protocol/https.rb in async-http-0.49.1 vs lib/async/http/protocol/https.rb in async-http-0.50.0
- old
+ new
@@ -23,12 +23,10 @@
require_relative 'http10'
require_relative 'http11'
require_relative 'http2'
-require_relative '../pool'
-
require 'openssl'
unless OpenSSL::SSL::SSLContext.instance_methods.include? :alpn_protocols=
warn "OpenSSL implementation doesn't support ALPN."
@@ -64,10 +62,10 @@
Async.logger.debug(self) {"Negotiating protocol #{name.inspect}..."}
if protocol = HANDLERS[name]
return protocol
else
- throw ArgumentError.new("Could not determine protocol for connection (#{name.inspect}).")
+ raise ArgumentError, "Could not determine protocol for connection (#{name.inspect})."
end
end
def self.client(peer)
protocol_for(peer).client(peer)