Created
October 27, 2011 16:00
-
-
Save DCarper/1319981 to your computer and use it in GitHub Desktop.
What's the reasoning behind these special cases?!?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| a = [0, 2, 3] | |
| a[3, 1] ## => [] # official special case | |
| a[4, 1] ## => nil | |
| a[5, 1] ## => nil | |
| ## | |
| a = [0, 1, 2, 3] | |
| a[4, 1] ## => [] # official special case | |
| a[5, 1] ## => nil | |
| a[6, 1] ## => nil | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment