kernel/common/array.rb
# Reallocates the internal Tuple to accommodate at least given size
Reallocates the internal Tuple to accommodate at least given size
Reallocates the internal Tuple to accommodate at least given size
def reallocate(at_least)
    return if at_least < @tuple.size
    new_size = @tuple.size * 2
    if new_size < at_least
      new_size = at_least
    end
    tuple = Tuple.new(new_size)
    tuple.copy_from @tuple, @start, @total, 0
    @start = 0
    @tuple = tuple
  end
def reallocate ( at_least ) return if at_least < @tuple . size new_size = @tuple . size * 2 if new_size < at_least new_size = at_least end tuple = Tuple . new ( new_size ) tuple . copy_from @tuple , @start , @total , 0 @start = 0 @tuple = tuple end
Reallocates the internal Tuple to accommodate at least given size
Reallocates the internal Tuple to accommodate at least given size
at_least
<not_specific>