arr = ['a', 'b', 'c']

arr.each_with_index do |char, i|
  puts i
  puts char
  puts '*****'
end

--output:--
0
a
*****
1
b
*****
2
c
*****



arr = [['a', 'b', 'c']]

arr.each_with_index do |char, i|
  puts i
  puts char
  puts '*****'
end


--output:--
0
a
b
c

-- 
Posted via http://www.ruby-forum.com/.