From: "Andreas S." Date: 2010-10-07T19:08:32+09:00 Subject: Re: save only first line from string? Jes炭s Gabriel y Gal叩n wrote: > str = str.first > > This way you avoid the intermediate array. String#lines returns an Enumerator, not an Array. I haven't looked at its implementation, but it does not necessarily process the whole string if you only call #first. -- Posted via http://www.ruby-forum.com/.