From: Brian Candler Date: 2003-02-12T05:58:00+09:00 Subject: Re: Range#length? On Wed, Feb 12, 2003 at 03:50:10AM +0900, Florian Frank wrote: > On 2003-02-12 03:12:19 +0900, Yukihiro Matsumoto wrote: > > Do you think of a good name for it? I'm glad to add a method if > > you have a good name. > > It doesn't seem to work for general ranges: > > r = "a".."z" > ==>"a".."z" > r.last - (r. exclude_end? ? 1 : 0) > NoMethodError: undefined method `-' for "z":String > from (irb):4 "y".succ >> "z" But I'm darned if I can find the method with does the opposite! Regards, Brian.