summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-08-02 11:22:56 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-08-02 11:26:58 +0900
commitffe4a6ebf93166544c4265271f7b8cffa2208af6 (patch)
tree3cb2c88249989ff4261a1307480f4c1ff6cf71eb
parent6de61fb9edf77d69e93cca8e4166b51b07c71c06 (diff)
Use RB_INTEGER_TYPE_P
-rw-r--r--rational.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/rational.c b/rational.c
index 0f3cee7..3737db4 100644
--- a/rational.c
+++ b/rational.c
@@ -119,7 +119,12 @@ f_abs(VALUE x)
return rb_funcall(x, id_abs, 0);
}
-fun1(integer_p)
+
+inline static VALUE
+f_integer_p(VALUE x)
+{
+ return RB_INTEGER_TYPE_P(x);
+}
inline static VALUE
f_to_i(VALUE x)