summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-12 15:43:34 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-12 15:43:34 +0000
commite7a7583029e7fe6609b5cf80ec30bb2e56d5b74b (patch)
tree2cfc77c622507ceaf3793c2067d8c4d88e69c0f1 /rational.c
parentbdd18a2c313414981aa1f457eec49bf13a8d1048 (diff)
downloadruby-e7a7583029e7fe6609b5cf80ec30bb2e56d5b74b.tar.gz
rational.c: remove f_negative_p
* rational.c (f_negative_p): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/rational.c b/rational.c
index f78017e467..9f7f2e1d34 100644
--- a/rational.c
+++ b/rational.c
@@ -161,12 +161,6 @@ fun2(idiv)
#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)
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 {