4

Построчно обойти файл ls.txt

File.open("ls.txt").each do |line|
  puts line 
end