use each_line on String for compatibility

Ruby 1.9.x or newer has no longer support using `each` method in String Class.

This plugin should use each_line.