From 7ec4533c93adc4838ce53f5119c2702b10c9043f Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 18 May 2016 01:17:43 +0000 Subject: ruby.h: RB_INTEGER_TYPE_P * include/ruby/ruby.h (RB_INTEGER_TYPE_P): new macro and underlying inline function to check if the object is an Integer (Fixnum or Bignum). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'string.c') diff --git a/string.c b/string.c index 5c09465196..1e4d867f9d 100644 --- a/string.c +++ b/string.c @@ -2746,7 +2746,7 @@ rb_str_concat(VALUE str1, VALUE str2) rb_encoding *enc = STR_ENC_GET(str1); int encidx; - if (FIXNUM_P(str2) || RB_TYPE_P(str2, T_BIGNUM)) { + if (RB_INTEGER_TYPE_P(str2)) { if (rb_num_to_uint(str2, &code) == 0) { } else if (FIXNUM_P(str2)) { -- cgit v1.2.3