Материал из Wiki.crossplatform.ru
	(Различия между версиями)
				
	
Версия 17:10, 26 мая 2010
 Each with index and block
    ["a", "b", "c"].each_with_index do |item, index|
  puts "At position #{index}: #{item}"
end
# At position 0: a
# At position 1: b
# At position 2: c