fix slice_before on empty enumerable #822

Merged
merged 1 commit into from Jun 24, 2013

Projects

None yet

2 participants

@statianzo
Contributor

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?

@statianzo statianzo fix slice_before on empty enumerable
This fixes an issue where calling slice_before on an empty enumerable
would return an enumerable containing one element of nil
4e102e3
@BanzaiMan BanzaiMan merged commit 69744e1 into jruby:master Jun 24, 2013

1 check passed

default The Travis CI build passed
Details
@BanzaiMan
Member

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