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 with _.last(a, n) where n > a.length and add test #365

Merged
merged 1 commit into from Nov 14, 2011

Conversation

wachunga
Copy link
Contributor

@wachunga wachunga commented Nov 8, 2011

This is also a problem with _.initial(), but I didn't fix that.

_.initial([1,2,3], 4)
[1, 2]

@yuchi
Copy link
Contributor

yuchi commented Nov 8, 2011

As expected initial is also broken for n > a.length. Are you going to fix that too? Should be trivial.

@wachunga
Copy link
Contributor Author

wachunga commented Nov 8, 2011

I wasn't planning on fixing that too. last() was the one that was giving me grief. :)

jashkenas added a commit that referenced this pull request Nov 14, 2011
Fix bug with _.last(a, n) where n > a.length and add test
@jashkenas jashkenas merged commit a7f1443 into jashkenas:master Nov 14, 2011
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