values = [1,2,3,4]
t= Tuple.new()
values.each { |val|
puts val
t = t + { val }
}
Error: tuple size cannot be greater than 300 (size is 301) ?
/usr/share/crystal/src/tuple.cr:80:17
What does this error mean ?
Crystal 0.36.1 [c3a3c1823] (2021-02-02)
LLVM: 10.0.0
Default target: x86_64-unknown-linux-gnu
This part is kinda strange. However, do you really need to use a tuple in the first place? Tuples are meant to be immutable not built out dynamically. Either just define the tuple with your values statically, or use an array if you need to add values dynamically.