While going over the Array class from the Ruby 2.0.0 docs, I noticed something I can't explain. The following is a direct example from the Ruby Docs:
a = [ "a", "b", "c", "d", "e" ]
a[6, 1] #=> nil
a[5] #=> nil
a[5, 1] #=> []
Could some one explain to me why a[5, 1]
has the output [ ]
?