HomePhorge

Handle the real semantics of `String#lines`...
399c859f2669Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Handle the real semantics of String#lines...

The previous monkey-patching of String#lines and IO#lines led to their
behaving differently in our code than in standard Ruby code. This is
generally surprising, and led to some subtle misuses of the method.

This corrects that, by adapting all the abusers to real Ruby calling
conventions over the enumerator interface.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>

Details

Provenance
Daniel Pittman <daniel@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU0dc446956894: Protect all existing methods when monkey-patching.
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPU399c859f2669: Handle the real semantics of `String#lines`... (authored by Daniel Pittman <daniel@puppetlabs.com>).Mar 30 2012, 9:15 PM