2009-04-01 6 views

Répondre

19

Ah, j'ai compris.

each_with_index 

woo!

éditer: whoops!

1

Par souci d'exhaustivité.

Thing.each_with_index {|obj, index_num| puts [obj, index_num].join(" has an index of ")} 
Questions connexes