From f1183cb910348685a1f9030fbda061d88950dfd2 Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 1 May 2016 21:59:41 +0000 Subject: [PATCH] complex.c don't refer rb_cFixnum and rb_cBignum. * complex.c: Don't refer rb_cFixnum and rb_cBignum. (k_fixnum_p): Use FIXNUM_P. (k_bignum_p): Use RB_TYPE_P. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ complex.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a2ed59c99e..359bd95eec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon May 2 06:58:38 2016 Tanaka Akira + + * complex.c: Don't refer rb_cFixnum and rb_cBignum. + (k_fixnum_p): Use FIXNUM_P. + (k_bignum_p): Use RB_TYPE_P. + Mon May 2 01:27:59 2016 Tanaka Akira * test/ruby/test_numeric.rb (test_step): Use Integer::FIXNUM_MAX. diff --git a/complex.c b/complex.c index 357e53c865..0d4073018d 100644 --- a/complex.c +++ b/complex.c @@ -238,13 +238,13 @@ k_numeric_p(VALUE x) inline static VALUE k_fixnum_p(VALUE x) { - return f_kind_of_p(x, rb_cFixnum); + return FIXNUM_P(x); } inline static VALUE k_bignum_p(VALUE x) { - return f_kind_of_p(x, rb_cBignum); + return RB_TYPE_P(x, T_BIGNUM); } inline static VALUE