From: Adam Prescott Date: 2011-04-15T01:36:34+09:00 Subject: Re: Array#slice's boundary special case...why? --485b3979da2abbc40204a0e2983f Content-Type: text/plain; charset=UTF-8 This comes up periodically. You can see http://www.ruby-forum.com/topic/1393096 which has quite a good explanation (one which I'd like to see in the documentation). There is also http://redmine.ruby-lang.org/issues/4541 On Thu, Apr 14, 2011 at 4:24 PM, Shane Emmons wrote: > Can anyone give me the background on why given the following: > arr = %w(0 1 2 3 4) > > Then arr[5,1] returns [] and arr[6,1] returns nil? I understand that the > last element +1 is labeled a special case, but why? > > -- > Shane Emmons > --485b3979da2abbc40204a0e2983f--