From: Michal Suchanek Date: 2007-12-19T19:20:15+09:00 Subject: Re: String#[] behaviour On 19/12/2007, MonkeeSage wrote: > No, because "-1" is a special value...it's got magic in it. It can > magically mean 5, or 10, or even 12 (because it's magic). ;) "-1" is > just sugar for #length, and #length is always a side-effect of a > container, whereas '0' is a constant entry point. -1 is as constant as 0. And because of its magic when used as container index it always means the end. And really length - 1, not just length. And at that place there is always the last object unless the container is empty. The same way as the first object is at 0. Thanks Michal