More arg handling fixes for Enumerable methods #898

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@dmarcotte
Contributor

Inspired by #836, I reviewed Enumerable's methods for other places the fix in #807 should be extended to. There were quite a few :)

This fixes almost all of them, focusing on the ones which could be remedied by proper arg packing and/or an arity tweak. Here's what's still outstanding:

  • #chunk, #slice_before, and #take_while still misbehave but seem to require deeper fixes
  • though most of the problems manifest when #each is implemented with a block.call, yield fails a couple the tests added here (for the methods like any? that don't want the args packed into an array)

I'll open separate issues to track those and ideally follow up with fixes.

@dmarcotte
Contributor

Opened #901 for the remaining enumerable issues and noticed that there's Rubyspec tags for the yield issue.

@headius
Member
headius commented Jul 23, 2013

Merged in 7723b9a. Thank you!

@headius headius closed this Jul 23, 2013
@dmarcotte dmarcotte deleted the dmarcotte:enum_args branch Jul 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment