From: Bill Guindon Date: 2004-09-28T06:26:26+09:00 Subject: Re: {newb} Each statements On Tue, 28 Sep 2004 06:07:01 +0900, David A. Black wrote: > On Tue, 28 Sep 2004, Bill Guindon wrote: > > srand(5000) > > ndata = '' > > a = data.size-1 > > data.each_byte do |c| > > ndata += (((c-97)+rand(10))%26).chr > > end > > That's a bit inefficient, because each time through you're creating a > new string in ndata. You could use << to append instead. hmmm... hadn't thought of that. Still have some old habits to break. /me takes notes. -- Bill Guindon (aka aGorilla)