Subject: Re: destructive! operations
From: Alexander Kellett <ruby-lists lypanov.net>
Date: Mon, 21 Feb 2005 01:54:08 +0900
References: 131808131840131847131852
In-reply-to: 131852
On Feb 20, 2005, at 5:23 PM, Caio Tiago Oliveira wrote:
> Bad example:
>
> while ( line = gets.chomp )
> # work with line
> end
unless ruby cow's the string and
the copy just has a truncating length,
then this requires copying of the line.
Alex