someara/line-cookbook — pull request #16 by srenatus (2014-05-09 09:42:33+00:00)
Title: Multiple matches cause unnecessary newlines in replace_or_add

If the pattern is matched by more than one line in the file, the second comparison (and all the following ones) would always fail since `new_resource.line` already ends with `\n` at that point. Therefore, these matches line would be replaced with the same line _plues another newline_.

This change should avoid that :)