lib/httpx/chainable.rb in httpx-0.9.0 vs lib/httpx/chainable.rb in httpx-0.10.0

- old
+ new

@@ -32,14 +32,14 @@ def wrap(&blk) branch(default_options).wrap(&blk) end - def plugin(*args, **opts) + def plugin(*args, **opts, &blk) klass = is_a?(Session) ? self.class : Session klass = Class.new(klass) klass.instance_variable_set(:@default_options, klass.default_options.merge(default_options)) - klass.plugin(*args, **opts).new + klass.plugin(*args, **opts, &blk).new end # deprecated def plugins(*args, **opts) klass = is_a?(Session) ? self.class : Session