From: Logan Capaldo Date: 2006-01-14T09:26:22+09:00 Subject: Re: Range#member? Oddity On Jan 13, 2006, at 7:18 PM, gwtmp01@mac.com wrote: > > On Jan 13, 2006, at 6:54 PM, David Vallner wrote: >> Well, to work well in Ranges, for any String s, s.succ > s must >> hold true. > > How about having Range use Object#strict_succ to generate > its sequence? Define String#strict_succ as needed to guarantee > s.succ > s and then alias strict_succ to succ for other classes > (such as Fixnum) so they don't break when used in a Range. > > > Gary Wright > > > > This seems to me to make the problem worse. People expect the values generated by String#succ to be in the array when doing a to_a for instance. I believe the real solution would be to bring back the distinction between member and include (possibly with a new name for the method with the functionality of #member).