From: yermej Date: 2007-12-19T00:09:58+09:00 Subject: Re: String#[] behaviour On Dec 18, 7:36 am, DNNX <6aLLIaPu...@gmail.com> wrote: > 'asd'[0...10] returns 'asd' while 'asd'[-10..-1] returns nil. > > As far as I understand, such behaviour completely satisfies ruby > documentation (http://www.ruby-doc.org/core/classes/String.html), but > it seems inconsistent to me. > > Any thoughts? > > Thanks From the docs for String#[] at that link: "Returns nil if the initial offset falls outside the string..."