From: Martin DeMello Date: 2003-01-28T09:39:16+09:00 Subject: Re: ruby-dev summary 19380-19436 TAKAHASHI Masayoshi wrote: > * Is the method name 'quo' appropriate? IMO, no. It reads very badly. I'd like a.over(b), though as Gavin said, it's a bit colloquial. > * Should we make Rational into standard? My knee-jerk reaction is 'yes', but I'd like to hear some of the 'against's first. Also, I realise that I've never actually had reason to use Rational. > * Does int.quo(float) and rational.quo(float) return > Rational or Float? Somewhat unorthodox, but I'd raise a "quo called with non-Rational" exception, for the following reasons: 1. You really shouldn't cast a float to a rational, so it can't return Rational. 2. If you're using quo rather than /, you probably have a good reason for wanting the exactness of a Rational, so returning a Float is pointless (no pun intended) 3. If you must convert float to rational, it should be explicit. martin