lib/httparty/connection_adapter.rb in httparty-0.13.3 vs lib/httparty/connection_adapter.rb in httparty-0.13.4

- old
+ new

@@ -48,23 +48,22 @@ # * :+verify_peer+: set to false to turn off server verification but still send client certificate # * :+ssl_ca_file+: see HTTParty::ClassMethods.ssl_ca_file. # * :+ssl_ca_path+: see HTTParty::ClassMethods.ssl_ca_path. # * :+connection_adapter_options+: contains the hash you passed to HTTParty.connection_adapter when you configured your connection adapter class ConnectionAdapter - # Private: Regex used to strip brackets from IPv6 URIs. StripIpv6BracketsRegex = /\A\[(.*)\]\z/ # Public def self.call(uri, options) new(uri, options).connection end attr_reader :uri, :options - def initialize(uri, options={}) - raise ArgumentError, "uri must be a URI, not a #{uri.class}" unless uri.kind_of? URI + def initialize(uri, options = {}) + raise ArgumentError, "uri must be a URI, not a #{uri.class}" unless uri.is_a? URI @uri = uri @options = options end @@ -118,10 +117,10 @@ else Kernel.warn("Warning: option :local_port requires Ruby version 2.0 or later") end end - return http + http end private def clean_host(host)