From: Martin DeMello Date: 2005-12-01T22:07:31+09:00 Subject: String + Range = Strange How does this work? irb(main):002:0> ("a".."z").to_a => ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"] irb(main):003:0> ("aa".."z").to_a => [] irb(main):004:0> ("aa".."1z").to_a => [] irb(main):005:0> ("aa".."b1").to_a ["aa".."zz" elided] What I mean is, what algorithm is used to determine that the stream of successors is not going to hit the endpoint of the range? And could this be used to do a faster-than-O(n) set memnbership test? martin