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/.