Anton Ivanov wrote: > Xiong Chiamiov wrote: > >> The problem is that, unlike practically everything else in Ruby, each >> loops don't pass by reference, so my assignments get lost. >> > > You're confused. The variable chunk contains a reference to an object. > You are assigning a different reference to that variable, that's all. Ah, that makes sense. I was a bit puzzled by that behavior, since it seemed like everything in Ruby passed by reference, but your explanation helped me get it straight in my mind. Tim Hunter wrote: > Check out Array#map! That looks exactly right. Thanks! -- Posted via http://www.ruby-forum.com/.