def state_run_block(channel)
      debug :run_block
      channel[:state] = nil
      blk = channel[:block]
      channel[:block] = nil
      begin
        instance_eval &blk
      rescue => ex
        channel[:exception] = ex
      end
      channel[:state] = :exit
    end
def state_run_block(channel)
      debug :run_block
      channel[:state] = nil
      blk = channel[:block]
      channel[:block] = nil
      begin
        instance_eval &blk
      rescue => ex
        channel[:exception] = ex
      end
      channel[:state] = :exit
    end
TODO: implement callback in create_channel Proc
def state_handle_error(channel)
  debug :handle_error
  channel[:state] = nil
  if rye_shell && (!channel.eof? || !channel.closing?)
    puts
    channel.send_data("exit\n")
  else
    channel.eof!
  end
end