Sorry Rick I think we are not communicating.

* I say that "must respond to" implies that _according to the docs_  
objects in a Range _must_ respond to #succ. I think there's no room  
for opinion there. Note the premise _according to the docs_.

* I say that from a formal point of view, the interface of Ranges  
does not imply Ranges are finite, and thus a Range#length implemented  
as a loop from left endpoint to right endpoint thorugh #succ may not  
terminate. That's theoretical (real computers have physical  
constraints) and pretended just to give a complete answer to the  
original question.

* Since you asked for it, I gave a non-constructive proof that showed  
such a Range is (theoretically) definable. I'd need to dig into my  
faculty notes to find an explicit bijection between Q and N that  
passed through Z x Z doing arithmetic such as primer decomposition  
and some sort of encoding I don't remember now. If you really want me  
to show such a function I can search for it, but I promise it is  
boring and the demonstration more difficult than the bijection I used  
in the thread.

* You try to disprove my thesis not by pointing to an error in the  
demonstration, but by saying Q is dense, which is not true and  
signals you clearly don't know the stuff we are talking about. And  
you still demand a conrete implementation doubting about my proof  
which you can't follow. Sorry Nick, I'd would have been pleased to  
explain the demonstration with more detail in a private email, but I  
find disappointing that you simply doubt about something you don't  
understand (which is fine, set theory does not come with brains) and  
put yourself in a blind "show me the code" way.

Now, the Ruby way of using things is fine with me. I mean, I've  
founded a company which is enterely Ruby-based, so I can guarantee  
you duck typing and the Ruby way of doing things is perfectly OK for  
me. My contribution to this thread (which I expected to be just a  
single post) is strictly formal. I've not questioned the use of  
ranges with invalid objects, I've not claimed they do not work, I  
just assert those usages are formally invalid according to the docs,  
which is just a fact!

-- fxn