Skip to content

Commit

Permalink
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -592,6 +592,17 @@ public Object divComplex(VirtualFrame frame, long a, RubyBasicObject b) {
return ruby(frame, "Complex(a) / b", "a", a, "b", b);
}


@Specialization(guards = {"!isComplex(arguments[1])", "!isRational(arguments[1])", "!isRubyBignum(arguments[1])"})
public Object divFallback(VirtualFrame frame, long a, RubyBasicObject b) {
return ruby(frame, "redo_coerced :/, o", "o", b);
}

@Specialization(guards = {"!isComplex(arguments[1])", "!isRational(arguments[1])", "!isRubyBignum(arguments[1])"})
public Object divFallback(VirtualFrame frame, int a, RubyBasicObject b) {
return ruby(frame, "redo_coerced :/, o", "o", b);
}

}

@CoreMethod(names = "%", required = 1)

0 comments on commit dce0852

Please sign in to comment.