[前][次][番号順一覧][スレッド一覧]

ruby-changes:44675

From: mrkn <ko1@a...>
Date: Sat, 12 Nov 2016 20:51:46 +0900 (JST)
Subject: [ruby-changes:44675] mrkn:r56748 (trunk): rational.c: optimize Numeric#quo

mrkn	2016-11-12 20:51:41 +0900 (Sat, 12 Nov 2016)

  New Revision: 56748

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56748

  Log:
    rational.c: optimize Numeric#quo
    
    * rational.c (numeric_quo): optimize Numeric#quo.
      Author: Tadashi Saito <tad.a.digger@g...>

  Modified files:
    trunk/rational.c
Index: rational.c
===================================================================
--- rational.c	(revision 56747)
+++ rational.c	(revision 56748)
@@ -1896,7 +1896,7 @@ numeric_quo(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/rational.c#L1896
     {
         x = rb_convert_type(x, T_RATIONAL, "Rational", "to_r");
     }
-    return rb_funcall(x, '/', 1, y);
+    return nurat_div(x, y);
 }
 
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]