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 slice_before on empty enumerable #822

Merged
merged 1 commit into from Jun 24, 2013
Merged

fix slice_before on empty enumerable #822

merged 1 commit into from Jun 24, 2013

Conversation

@statianzo
Copy link
Contributor

@statianzo statianzo commented Jun 24, 2013

This fixes an issue where calling slice_before on an empty enumerable
would return an enumerable containing one element of nil

#before
[].slice_before(1).to_a #=> [nil]
#after
[].slice_before(1).to_a #=> []

Would you also like a test added to rubyspec around this?

This fixes an issue where calling slice_before on an empty enumerable
would return an enumerable containing one element of nil
BanzaiMan added a commit that referenced this pull request Jun 24, 2013
fix slice_before on empty enumerable
@BanzaiMan BanzaiMan merged commit 69744e1 into jruby:master Jun 24, 2013
1 check passed
1 check passed
@veganstraightedge
default The Travis CI build passed
Details
@BanzaiMan
Copy link
Member

@BanzaiMan BanzaiMan commented Jun 24, 2013

Thanks! The test should go to RubySpec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants