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

Don't dup every element in Enumerator#drop (9K) #4225

Merged
merged 1 commit into from
Nov 8, 2016

Commits on Oct 13, 2016

  1. Don't dup every element in Enumerator#drop

    In 06f0441 (JRUBY-6892) Enumerable#drop was changed to call #dup on every element that ended up in the result, but that might not work. Not all objects correctly implement #dup, or are even allocatable.
    
    #take was not changed, and looking at the differences between #take and #drop the only thing that stood out was that the signature of the #each call was different. Changing from Signature.NO_ARGUMENTS to Signature.ONE_REQUIRED make the issue that 06f0441 tried to fix go away.
    iconara committed Oct 13, 2016
    Configuration menu
    Copy the full SHA
    6996e2e View commit details
    Browse the repository at this point in the history