From: Joel VanderWerf Date: 2008-02-22T07:47:07+09:00 Subject: Re: Newbie Mem Leak Issue John Woods wrote: > >> Array.new(1000000) {str} > > Isn't the above still just an array of 1000000 refs to the same string? > Perhaps you meant str.dup? Oops, you're right. Using #dup or the following will work: a = Array.new(5) {"str"} p a.map {|s| s.object_id}.uniq.size # => 5 -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407