![](https://secure.gravatar.com/avatar/8df76576684a4453155c33273e041bce.png?default=mp&rating=pg&size=250)
José Fernando Dávila
Joined
3,310 Experience
33 Lessons Completed
0 Questions Solved
Activity
According to this previously, we could use "$." (before Ruby version 2.6). The best alternative I've found is the following:
CSV.foreach('example.csv', headers: true).with_index(1) do |row, index|
puts index
end