def position=(new_position)
      raise ArgumentError, "negative position given" if new_position < 0
      raise ArgumentError, "specified position exceeds capacity" if new_position > @capacity

      @mark = nil if @mark && @mark > new_position
      @position = new_position
    end
def position=(new_position)
      raise ArgumentError, "negative position given" if new_position < 0
      raise ArgumentError, "specified position exceeds capacity" if new_position > @capacity

      @mark = nil if @mark && @mark > new_position
      @position = new_position
    end
Set the position to the given value. New position must be less than limit.
 Preserves mark if it's less than the new position, otherwise clears it.

 @param new_position [Integer] position in the buffer

 @raise [ArgumentError] new position was invalid