Use IO#each_line instead of #lines (deprecated)