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