From: "David A. Black" Date: 2009-02-10T21:51:30+09:00 Subject: Re: a better way to do this job? Hi -- On Tue, 10 Feb 2009, Julian Leviston wrote: > Slices and 'sub-arrays' aren't copies of the objects, they simply refer to > the identical objects. The same can be said of any array; the objects inside it exist (in many cases, at least) already. Still, container objects do take up memory. If you don't believe it, try this: ruby -e 'a = [:a,:b,:c]; b = []; while true; b << a[0,3]; end' David -- David A. Black / Ruby Power and Light, LLC Ruby/Rails consulting & training: http://www.rubypal.com Coming in 2009: The Well-Grounded Rubyist (http://manning.com/black2) http://www.wishsight.com => Independent, social wishlist management!