Yes well, a String is not an Enumerable. You can use String#lines to split it into an Enumerable of lines. Looks a bit more portable since it splits on $/ and not on