quo(p1)
Returns most exact division (rational for integers, float for floats).
static VALUE numeric_quo(VALUE x, VALUE y) { if (RB_TYPE_P(y, T_FLOAT)) { return f_fdiv(x, y); } #ifdef CANON if (canonicalization) { x = rb_rational_raw1(x); } else #endif { x = rb_convert_type(x, T_RATIONAL, "Rational", "to_r"); } return rb_funcall(x, '/', 1, y); }