From: Jason Foreman Date: 2005-07-22T12:40:14+09:00 Subject: Re: Odd Array#[x..y] return values On 7/21/05, Ara.T.Howard wrote: > On Fri, 22 Jul 2005, Daniel Berger wrote: > > > Hi all, > > > > Ruby 1.8.2 > > > > Consider: > > > > irb(main):001:0> a = [] > > => [] > > irb(main):002:0> a[0..1] > > => [] > > start at a legitimate index and continue with every possible index until the > end, not matter where that is > Then why this?: irb(main):001:0> [][0] => nil irb(main):002:0> [][0..1] => [] irb(main):003:0> [][1..1] => nil 0 is not a legitimate index on an empty array. Seems like a bug to me.