diff --git a/rational.c b/rational.c index d032cbd5a7..0dfc8abe12 100644 --- a/rational.c +++ b/rational.c @@ -2014,6 +2014,10 @@ numeric_denominator(VALUE self) VALUE rb_numeric_quo(VALUE x, VALUE y) { + if (RB_TYPE_P(x, T_COMPLEX)) { + return rb_complex_div(x, y); + } + if (RB_FLOAT_TYPE_P(y)) { return rb_funcallv(x, idFdiv, 1, &y); }