Creates a new static array filled with the given value.
Creates a new static array and invokes the block once for each index of the array, assigning the block's value in that index.
Returns a tuple populated with the elements at the given indexes.
Creates a new static array filled with the given value.
StaticArray(Int32, 3).new(42) #=> [42, 42, 42]Creates a new static array and invokes the block once for each index of the array, assigning the block's value in that index.
StaticArray(Int32, 3).new { |i| i * 2 } #=> [0, 2, 4]Returns a tuple populated with the elements at the given indexes. Raises if any index is invalid.
a = StaticArray(Int32, 4).new { |i| i + 1 }
a.values_at(0, 2) #=> {1, 3}