def put(index, element = yield(get(index)))
      raise IndexError, "index #{index} outside of tuple bounds" if index < -@size
      element = Erlang.from(element)
      index += @size if index < 0
      if index > @size
        suffix = Array.new(index - @size, nil)
        suffix << element
        return replace_suffix(@size, suffix)
      else
        return update_root(index, element)
      end
    end
def put(index, element = yield(get(index)))
      raise IndexError, "index #{index} outside of tuple bounds" if index < -@size
      element = Erlang.from(element)
      index += @size if index < 0
      if index > @size
        suffix = Array.new(index - @size, nil)
        suffix << element
        return replace_suffix(@size, suffix)
      else
        return update_root(index, element)
      end
    end
Return a new `Tuple` with a new value at the given `index`. If `index`
 is greater than the length of the tuple, the returned tuple will be
 padded with `nil`s to the correct size.

 @overload put(index, element)
   Return a new `Tuple` with the element at `index` replaced by `element`.

   @param element [Object] The object to insert into that position
   @example
     Erlang::Tuple[1, 2, 3, 4].put(2, 99)
     # => Erlang::Tuple[1, 2, 99, 4]
     Erlang::Tuple[1, 2, 3, 4].put(-1, 99)
     # => Erlang::Tuple[1, 2, 3, 99]
     Erlang::Tuple[].put(2, 99)
     # => Erlang::Tuple[nil, nil, 99]

 @overload put(index)
   Return a new `Tuple` with the element at `index` replaced by the return
   value of the block.

   @yield (existing) Once with the existing value at the given `index`.
   @example
     Erlang::Tuple[1, 2, 3, 4].put(2) { |v| v * 10 }
     # => Erlang::Tuple[1, 2, 30, 4]

 @param index [Integer] The index to update. May be negative.
 @return [Tuple]