HomePhorge

(#12268) String#each is not available in Ruby 1.9
a8a0f5fc5d62Unpublished

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

Description

(#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>

Details

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPUa8a0f5fc5d62: (#12268) String#each is not available in Ruby 1.9 (authored by Daniel Pittman <daniel@puppetlabs.com>).Jan 30 2012, 9:58 PM