ruby-changes:44624
From: mrkn <ko1@a...>
Date: Fri, 11 Nov 2016 00:23:52 +0900 (JST)
Subject: [ruby-changes:44624] mrkn:r56697 (trunk): rational.c: optimize Rational#to_f by using rb_int_fdiv
mrkn 2016-11-11 00:23:43 +0900 (Fri, 11 Nov 2016) New Revision: 56697 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56697 Log: 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. Modified files: trunk/rational.c Index: rational.c =================================================================== --- rational.c (revision 56696) +++ rational.c (revision 56697) @@ -1455,7 +1455,7 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/rational.c#L1455 nurat_to_f(VALUE self) { get_dat1(self); - return f_fdiv(dat->num, dat->den); + return rb_int_fdiv(dat->num, dat->den); } /* -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/