From: Yukihiro Matsumoto Date: 2005-11-25T11:19:07+09:00 Subject: Re: Improving min/max for Range Hi, In message "Re: Improving min/max for Range" on Fri, 25 Nov 2005 10:53:35 +0900, Alexander writes: |> #min makes sense. I'd like to merge your idea. #max needs to |> consider about end exclusion. I'm not sure what (0...1.0).max should |> return. Error? |Good point. I think max should throw if the number doesn't support the |integer protocol; there's simply no way to handle it intelligently. |For int-type types, I suggest that (end.to_int - 1) should be used, |since there is no #pred counterpart to #succ. I've just committed my implementation of Range#min and #max to CVS HEAD. Check if you have interest. matz.