lib/peddler/client.rb in peddler-0.12.5 vs lib/peddler/client.rb in peddler-0.12.7

- old
+ new

@@ -82,13 +82,13 @@ def operation(action = nil) action ? @operation = Operation.new(action) : @operation end - def run(&blk) + def run opts = defaults.merge(query: operation, headers: headers) opts.store(:body, body) if body - opts.store(:response_block, blk) if block_given? + opts.store(:response_block, Proc.new) if block_given? res = post(opts) parser.parse(res, encoding) rescue Excon::Errors::Error => ex handle_error(ex) or raise