From: Ryan Date: 2010-09-25T11:30:16+09:00 Subject: Using the same variable for an array and an iterator I've just started learning Ruby and am going through a few tutorials. Right now I'm playing around with arrays and am getting a strange error. I am creating an array named 'x' and creating an iterator named x as well. Now I know that this isn't good practice but I'm getting a strange error. The first time I iterate through the entire array, simply displaying the contents of the array, I don't get an error at all. If I immediately run the iteration again I get a NoMethodError and am trying to figure out why. Here's a screenshot http://bit.ly/bXZkjp Like I said, I know that this is bad practice, but I'm curious as to what is causing this error only after the first go through.