From: yermej Date: 2007-12-19T01:06:16+09:00 Subject: Re: String#[] behaviour On Dec 18, 9:06 am, yermej wrote: > 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..." Nevermind what I said. Some days I don't read so good and stuff.