text=''line_count = 0File.open("text.txt").each do |line| line_count += 1 text << lineendputs "#{line_count} lines"