From: Joey Zhou Date: 2011-05-25T23:43:45+09:00 Subject: [ruby-core:36467] [Ruby 1.9 - Feature #4778] IO#each_chomped Issue #4778 has been updated by Joey Zhou. Rodrigo Rosenfeld Rosas wrote: > I wouldn't say this is about laziness, but about code readability. I agree this is a common use, but doesn't each_line already do that? No, #each_line is just a synonym of #each. ---------------------------------------- Feature #4778: IO#each_chomped http://redmine.ruby-lang.org/issues/4778 Author: Joey Zhou Status: Open Priority: Normal Assignee: Category: Target version: When manipulating text files, mostly, the input record separator(saying "\n") is scrap and will be chomped. I suggest a method IO#each_chomped directly yielding the record with input record separator chomped. Laziness is a virtue.. Joey -- http://redmine.ruby-lang.org