From: Adam Prescott Date: 2011-01-30T00:38:26+09:00 Subject: Re: Array Slicing 1.9.2 --90e6ba5bb92d1f1fb6049afde5c9 Content-Type: text/plain; charset=UTF-8 On Sat, Jan 29, 2011 at 6:45 AM, Lucky Dev wrote: > I'm using ruby 1.9.2 Today i was playing around array and here is the > console log. > > [...] > > a[6,1] or a[6,n] should give 1 or n elements from 6th index. There is no > element in 6th index. so it must return a nil. > It should be the same for a[7,1] or a[7,n] and for this a[7,n] it > returns nil. > > Both a[6] a[7] does not exist in array. can you explain why there is a > difference in slicing output above. > There was a discussion about this that you can read: http://www.ruby-forum.com/topic/216796 It's not actually specific to 1.9, if you're wondering. --90e6ba5bb92d1f1fb6049afde5c9--