From: Robert Dober Date: 2009-05-09T20:53:11+09:00 Subject: Re: ruby string slice/[] w/ range, weird end behavior (RANT) On Sat, May 9, 2009 at 1:41 PM, Eleanor McHugh wrote: > On 9 May 2009, at 09:22, Robert Dober wrote: >> >> On Sat, May 9, 2009 at 3:12 AM, Eleanor McHugh >> wrote: >>> >>> Yes. We all have our moron moments. After all, the String.[] >>> documentation >> >> Speak for yourself, I am *always* a moron (luckily I have no idea what >> that means). > > I know exactly what you mean - let those who never write a bug throw the > first rant :) > >>> clearly states: >>> >>>    Element Reference---If passed a single +Fixnum+, returns a >>>    substring of one character at that position. >> >> Does it? >> Well I guess so, for Ruby1.8.* ;) > > I pulled that straight from ri in my 1.9.1 install... > >     From Ruby 1.9.1 > ------------------------------------------------------------------------ >     Element Reference---If passed a single +Fixnum+, returns a >     substring of one character at that position. > oh yes that is what it does, I cannot read, sorry (but I just proved my statemet above ;)