Issue #3767 has been updated by Thomas Sawyer.


@Yui
Yes, :each_line could be used for this particular this example b/c of the regular expression used, but not in the general case.

@Run Paint Run Run
That's a good point. So, it would be a bigger deal than I expected. But I wonder if #[] could be defined for Enumerator? Wouldn't it mean applying the enumeration method and breaking out after n iterations with the current value of the loop? That might actually be useful in other cases.



----------------------------------------
http://redmine.ruby-lang.org/issues/show/3767

----------------------------------------
http://redmine.ruby-lang.org