Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Iterator#auto_rewind? and auto_rewind= #3796

Commits on Dec 30, 2016

  1. Add Iterator#auto_rewind? and auto_rewind=

    If Iterator#auto_rewind? returns true, the iterator is rewinded after Iterator#each
    automatically. Otherwise it returns false, the iterator is not rewinded.
    
    Iterator#auto_rewind? default value is true, it is just breaking change.
    
    This feature motivation is to be able to apply Enumerable algorithm to
    Iterator. In current implementation, `Iterator#each` works only first
    time.
    makenowjust committed Dec 30, 2016
    Configuration menu
    Copy the full SHA
    0bafb0d View commit details
    Browse the repository at this point in the history