If we add IPV6 as host for connection it doesn't work, cause it parses address badly ending up with
WARN -- #<Bunny::Session:0x4d287b0 guest@2001:0, vhost=/, addresses=[2001:db8:fd00:1000::10]>: Could not establish TCP connection to 2001:0: Invalid argument - connect(2) for 0.0.7.209
I assume it's because of this code https://github.com/ruby-amqp/bunny/blob/dcf5c480b379975b46230ece64bc22d4232b5f44/lib/bunny/session.rb#L800
It parses last :
Support IPv6 addresses in address lists (see below for limitations)
This requires IPv6 addresses to be enquoted in square brackets.
Credits: Jeremy Heiler.