lib/bunny_mock/session.rb in bunny-mock-1.5.0 vs lib/bunny_mock/session.rb in bunny-mock-1.6.0
- old
+ new
@@ -86,12 +86,12 @@
# @param [Integer] n Channel identifier
# @param [Integer] pool_size Work pool size (insignificant)
#
# @return [BunnyMock::Channel] Channel instance
# @api public
- def create_channel(n = nil, _pool_size = 1)
+ def create_channel(n = nil, _pool_size = 1, *_args)
# raise same error as {Bunny::Session#create_channel}
- raise ArgumentError, 'channel number 0 is reserved in the protocol and cannot be used' if n == 0
+ raise ArgumentError, 'channel number 0 is reserved in the protocol and cannot be used' if n && n.zero?
# return cached channel if exists
return @channels[n] if n && @channels.key?(n)
# create and open channel