The code below does not print the elements of the array. Why is that?
array = [1, 2, 3]
array.each do |x|
puts x
end
array.each { |x| puts x }
It used to work in previous versions. I know Crystal is not Ruby, but the code above works in Ruby. What is the best practice to iterate through an array in Crystal? And why did the Crystal developers decide to make Crystal incompatible with Ruby in such a basic scenario?