(#12268) String#each is not available in Ruby 1.9
In earlier versions of Ruby, String#each and String#each_line were identical.
In the 1.9 series the former was dropped; this audits the code for places that
should by using each_line instead.
This includes some fixes for tests that had very specific stubs around reading
file content, where the expectation - but not the test - was broken by
changing the method we invoke.
It also fixes a stub over execpipe that had a different return type to the
actual method, but which happened to work because each was defined on both
Array and String in earlier versions.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>