HF RL Explorer

Task: Ruby CSV - Get Current Line/Row Number

Task: Ruby CSV - Get Current Line/Row Number: a task in Terminal-Lego-15k (Harbor dataset). Write a Ruby script that reads a CSV file and outputs each row's 1-based row number alongside the row's data. The goal is to correctly obtain the current line/row number while iterating through a CSV file…

The task

Write a Ruby script that reads a CSV file and outputs each row's **1-based row number** alongside the row's data. The goal is to correctly obtain the current line/row number while iterating through a CSV file using Ruby's built-in `CSV` library.

Part of PrimeIntellect/Terminal-Lego-15k.