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:
parent
eb270be29b
commit
3e430c3a49
1 changed files with 1 additions and 1 deletions
|
@ -1455,7 +1455,7 @@ static VALUE
|
||||||
nurat_to_f(VALUE self)
|
nurat_to_f(VALUE self)
|
||||||
{
|
{
|
||||||
get_dat1(self);
|
get_dat1(self);
|
||||||
return f_fdiv(dat->num, dat->den);
|
return rb_int_fdiv(dat->num, dat->den);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue