Backporting enumerators to 1.8.2 might be tricky, yeah. Not sure whether the backports gem would work that far back.

This will work on all though:

```ruby
text.split("\n").each_with_index { |line, lineno| ... }
```