Use each_line instead lines.each

Because lines is deprecated in Ruby 2.0.0.