ruby-changes:44687
From: mrkn <ko1@a...>
Date: Sun, 13 Nov 2016 00:43:37 +0900 (JST)
Subject: [ruby-changes:44687] mrkn:r56760 (trunk): rational.c: remove f_negative_p
mrkn 2016-11-13 00:43:34 +0900 (Sun, 13 Nov 2016) New Revision: 56760 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56760 Log: rational.c: remove f_negative_p * rational.c (f_negative_p): removed. Modified files: trunk/rational.c Index: rational.c =================================================================== --- rational.c (revision 56759) +++ rational.c (revision 56760) @@ -161,12 +161,6 @@ fun2(idiv) https://github.com/ruby/ruby/blob/trunk/rational.c#L161 #define f_expt10(x) rb_int_pow(INT2FIX(10), x) inline static int -f_negative_p(VALUE x) -{ - return rb_num_negative_p(x); -} - -inline static int f_zero_p(VALUE x) { if (RB_INTEGER_TYPE_P(x)) { @@ -1010,7 +1004,7 @@ nurat_expt(VALUE self, VALUE other) https://github.com/ruby/ruby/blob/trunk/rational.c#L1004 return f_rational_new_bang1(CLASS_OF(self), INT2FIX(f_odd_p(other) ? -1 : 1)); } else if (INT_ZERO_P(dat->num)) { - if (f_negative_p(other)) { + if (rb_num_negative_p(other)) { rb_num_zerodiv(); } else { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/