def []=(*args)
      *target, val = args
      pos, len = target

      if pos.is_a?(Range)
        @buffer.set_lines(*range_indices(pos), true, Array(val))
      else
        start, stop = length_indices(pos, len || 1)
        @buffer.set_lines(start, stop, true, Array(val))
      end
    end
def []=(*args)
      *target, val = args
      pos, len = target

      if pos.is_a?(Range)
        @buffer.set_lines(*range_indices(pos), true, Array(val))
      else
        start, stop = length_indices(pos, len || 1)
        @buffer.set_lines(start, stop, true, Array(val))
      end
    end
Set a line or line range.

 @overload []=(index, string)
   @param index [Integer]
   @param string [String]

 @overload []=(index, length, strings)
   @param index [Integer]
   @param length [Integer]
   @param strings [Array<String>]

 @overload []=(range, strings)
   @param range [Range]
   @param strings [Array<String>]

 @example Replace the first line using an index
   line_range[0] = "first"
 @example Replace the first two lines using a +Range+
   line_range[0..1] = ["first", "second"]
 @example Replace the first two lines using an index and length
   line_range[0, 2] = ["first", "second"]