On Tue, 8 Feb 2005 01:01:19 +0900, Chris Gehlker <canyonrat / mac.com> wrote:
> 
> I get your points. My question was how come the assignment back to
> testAry doesn't replace it with an array of numbers. 

Because the return value of 'each' is the (unchanged) receiver, not
the accumulated results of the block operating on the array contents.
. 
> Here is a
> different version of the program which may highlight the problem.
> 
> testAry = ["5", "7", "9"]
> p testAry
> numAry = testAry.each { |n| n.to_i}
> p numAry


"testAry.each { |n| n.to_i} " returns testAry.  The "each" call did
not alter testAry, so you see the orignal values.

James