I am trying to get the iteration number of a loop I am on. I tried
objects.each do |object, i|
but i is nil
Any ideas?
···
--
Posted via http://www.ruby-forum.com/.
I am trying to get the iteration number of a loop I am on. I tried
objects.each do |object, i|
but i is nil
Any ideas?
--
Posted via http://www.ruby-forum.com/.
objects.each_with_index do |o, i|
martin
On Thu, Aug 7, 2008 at 3:53 PM, Joel Saltzmanjoelh <talk@joelsaltzman.com> wrote:
I am trying to get the iteration number of a loop I am on. I tried
objects.each do |object, i|