On Fri, 22 Jul 2005, Jason Foreman wrote:

> On 7/21/05, Ara.T.Howard <Ara.T.Howard / noaa.gov> 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.

yes it does.

-a
-- 
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| My religion is very simple.  My religion is kindness.
| --Tenzin Gyatso
===============================================================================