1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
mrkn 2016-11-10 15:23:43 +00:00
parent eb270be29b
commit 3e430c3a49

View file

@ -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);
}
/*