From: Trans Date: 2005-12-01T13:27:30+09:00 Subject: Re: string range membership > In closing: > ('1'..'10').to_a.member?('2') > => true > > Is that really such a big deal? This is but one common instance. The issue extends beyond this. Range is constrained by exceptional behaviors such that it can't be used more creatively in an assured functioning manner. For instance, youd expect #member? to do what the documentation says it does. If it not going to do that the documentation ought to be changed. Why hasn't it? Becuase Range has a great deal of exceptional behavior for the sake of efficency. Documenting the actual behavior would be too complicated. Given the current implementation of Range and how it is used (or more percisely, how it can't be used), and since there is clearly no intetn to do otherwise, it just doesn't make sense to push it as some sort of generalized component. Might as well give Range all the knowledge it needs to do its basic job and forget this "mixin nature" altogether (i.e. #succ and #<=> of the sentinals). Finish coding Range to know what an numeric sequence is and what a string sequence is and forget about it (If you've ever looked at the code you know it's half way there anyway). At least it would be even more efficient then. T.