From: Christer Nilsson Date: 2006-01-14T14:29:44+09:00 Subject: Re: Range#member? Oddity Hal Fulton wrote: > James Edward Gray II wrote: >> => false > In short: Don't do this. > > String ranges are very weird. They don't obey the rule that > x.succ > x. > > Since "2" > "10", "2" is considered outside the range entirely. > > If you really want to do this kind of thing, say > ("1".."10").to_a.member?("2") > > > Hal If the two strings have the same length, the weirdness disappears. Christer -- Posted via http://www.ruby-forum.com/.