lib/amqp/channel.rb in amqp-0.9.3 vs lib/amqp/channel.rb in amqp-0.9.4
- old
+ new
@@ -826,13 +826,13 @@
def queue!(name, opts = {}, &block)
queue = if block.nil?
Queue.new(self, name, opts)
else
shim = Proc.new { |q, method|
- queue = find_queue(method.queue)
if block.arity == 1
- block.call(queue)
+ block.call(q)
else
+ queue = find_queue(method.queue)
block.call(queue, method.consumer_count, method.message_count)
end
}
Queue.new(self, name, opts, &shim)
end