stack = [] of Int32 (1..10).each do |x| stack.push x end 10.times do puts stack.pop end