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

Fix bug in flat_map for enumerables that yield multiple values #3250

Merged
merged 2 commits into from Dec 22, 2014

Conversation

sferik
Copy link
Contributor

@sferik sferik commented Dec 22, 2014

There’s a small bug in the implementation of Enumerable#flat_map with enumerables that yield multiple values. The added spec fails before this patch is applied, returning [1, 2] instead of [1]. I believe this spec should also be added to the RubySpec project. Should I submit a separate pull request for that or will it be added to RubySpec automatically?

@jemc
Copy link
Member

jemc commented Dec 22, 2014

@sferik - the specs get synced between here and rubyspec bidirectionally, so just adding the spec here is okay (and preferred, if the bug fix is being committed here as well). However, the CONTRIBUTING file suggests the spec should be in a separate commit (https://github.com/rubinius/rubinius/blob/master/CONTRIBUTING#L58), which probably makes this syncing process a bit easier.

@sferik
Copy link
Contributor Author

sferik commented Dec 22, 2014

@jemc My mistake. I will review the CONTRIBUTING file more thoroughly and correct this error.

@jc00ke
Copy link
Member

jc00ke commented Dec 22, 2014

I believe the failed job is from something else. Re-running (log here) but this looks OK to me.

jc00ke added a commit that referenced this pull request Dec 22, 2014
Fix bug in flat_map for enumerables that yield multiple values
@jc00ke jc00ke merged commit b6139e6 into rubinius:master Dec 22, 2014
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.

None yet

3 participants