You can also read an entire file into an array, split by lines
puts File.open("text.txt").readlines.join("--")