def insert_field(field)
      lo, hi = 0, size
      while lo < hi
        mid = (lo + hi).div(2)
        if field < self[mid]
          hi = mid
        else
          lo = mid + 1
        end
      end

      insert lo, field
    end
def insert_field(field)
      lo, hi = 0, size
      while lo < hi
        mid = (lo + hi).div(2)
        if field < self[mid]
          hi = mid
        else
          lo = mid + 1
        end
      end

      insert lo, field
    end
Insert the field in sorted order.

 Heavily based on bisect.insort from Python, which is:
   Copyright (C) 2001-2013 Python Software Foundation.
   Licensed under <http://docs.python.org/license.html>
   From <http://hg.python.org/cpython/file/2.7/Lib/bisect.py>