Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use the checked (cached) site for to_r method dispatch
Browse files Browse the repository at this point in the history
kares committed Jul 20, 2017
1 parent c60a185 commit 651a09b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyRational.java
Original file line number Diff line number Diff line change
@@ -371,7 +371,7 @@ private static IRubyObject convertCommon(ThreadContext context, IRubyObject recv

if (a2 == context.nil) {
if (!(a1 instanceof RubyNumeric && f_integer_p(context, a1).isTrue())) {
return TypeConverter.convertToType(a1, context.runtime.getRational(), "to_r");
return TypeConverter.convertToType(context, a1, context.runtime.getRational(), sites(context).to_r_checked);
}
return newInstance(context, recv, a1);
} else {

0 comments on commit 651a09b

Please sign in to comment.