lib/httpx/plugins/stream.rb in httpx-0.11.3 vs lib/httpx/plugins/stream.rb in httpx-0.12.0

- old
+ new

@@ -117,14 +117,12 @@ def respond_to_missing?(*args) @options.response_class.respond_to?(*args) || super end def method_missing(meth, *args, &block) - if @options.response_class.public_method_defined?(meth) - response.__send__(meth, *args, &block) - else - super - end + return super unless @options.response_class.public_method_defined?(meth) + + response.__send__(meth, *args, &block) end end end register_plugin :stream, Stream end