From: Bulat Ziganshin Date: 2002-10-25T21:18:41+09:00 Subject: Re: Things That Newcomers to Ruby Should Know (10/16/02) Hello Gergely, Friday, October 25, 2002, 3:09:16 PM, you wrote: >> b = a.map {|x| x * 2} .map {|x| x * 3} KG> BTW, ONE or TWO intermediate objects? KG> So, a.map {|x| x*2} must be created, but right after the assignment will KG> this object be deleted? ONE intermediate object and ONE assigned to b. this intermediate object will be garbage coolected with all other ones. btw, seasoned ruby programmers wrote: a.map {|x| x * 2} .map! {|x| x * 3} (replace second "map" to "map!"). -- Best regards, Bulat mailto:bulatz@integ.ru