summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-10 15:23:43 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-10 15:23:43 +0000
commit3e430c3a496af286969cba057f0106859dfc6f91 (patch)
treed62a355087c63957b3cb73d0251863e9f764841d
parenteb270be29b194465d26a19f1688faf8dfb359868 (diff)
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
-rw-r--r--rational.c2
1 files changed, 1 insertions, 1 deletions
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);
}
/*