class Net::SSH::Connection::Session

def each_channel(&block)

iterate channels with the posibility of callbacks opening new channels during the iteration
def each_channel(&block)
  channels.dup.each(&block)
end