Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't dup every element in Enumerator#drop (1.7) #4226
This fixes #4218 in JRuby 1.7.
In 06f0441 (JRUBY-6892)
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 Arity.NO_ARGUMENTS to Arity.ONE_REQUIRED make the issue that 06f0441 tried to fix go away.
I'm unsure which branch that this PR should target, please help me out. The fix should go into the next 1.7.x release.
I'm also unable to run the tests in