From 3e430c3a496af286969cba057f0106859dfc6f91 Mon Sep 17 00:00:00 2001 From: mrkn Date: Thu, 10 Nov 2016 15:23:43 +0000 Subject: [PATCH] rational.c: optimize Rational#to_f by using rb_int_fdiv * rational.c (nurat_to_f): optimize Rational#to_f by using rb_int_fdiv. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- rational.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rational.c b/rational.c index 8362075ab4..1a9e609423 100644 --- a/rational.c +++ b/rational.c @@ -1455,7 +1455,7 @@ static VALUE nurat_to_f(VALUE self) { get_dat1(self); - return f_fdiv(dat->num, dat->den); + return rb_int_fdiv(dat->num, dat->den); } /*