Skip to content

More arg handling fixes for Enumerable methods#898

Closed
dmarcotte wants to merge 1 commit intojruby:masterfrom
dmarcotte:enum_args
Closed

More arg handling fixes for Enumerable methods#898
dmarcotte wants to merge 1 commit intojruby:masterfrom
dmarcotte:enum_args

Conversation

@dmarcotte
Copy link
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
Copy link
Contributor Author

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

@headius
Copy link
Member

headius commented Jul 23, 2013

Merged in 7723b9a. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants