From: Vin Raja Date: 2007-07-19T15:46:10+09:00 Subject: Array : each_with_index Hi All, I have following lines m=['a','b','c'] puts m.each_with_index{|v,i| i} which output in: >ruby try.rb a b c >Exit code: 0 I was expecting to see indexes, rather than values. Am I overlooking some trivial nuance or what. Basically i wanted to print index values while iterating an array at some other project. and "each_with_index" seemed very obvious for the task but for the unexpected result. Raja -- Posted via http://www.ruby-forum.com/.