diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-05-23 07:13:21 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-05-23 07:13:21 +0000 |
commit | b0dd250dc95ea0fae89c3201967039d582fbf156 (patch) | |
tree | fb9483ca974a305e496eb87e960dcfecf7b9115f /pack.c | |
parent | 87c8c5edf43a7f7d33d5fe75f51ef410a03b93b1 (diff) | |
download | ruby-b0dd250dc95ea0fae89c3201967039d582fbf156.tar.gz |
use RB_TYPE_P() instead of comparison of TYPE()
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'pack.c')
-rw-r--r-- | pack.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2057,7 +2057,7 @@ pack_unpack(VALUE str, VALUE fmt) p = RARRAY_PTR(a); pend = p + RARRAY_LEN(a); while (p < pend) { - if (TYPE(*p) == T_STRING && RSTRING_PTR(*p) == t) { + if (RB_TYPE_P(*p, T_STRING) && RSTRING_PTR(*p) == t) { if (len < RSTRING_LEN(*p)) { tmp = rb_tainted_str_new(t, len); rb_str_associate(tmp, a); @@ -2099,7 +2099,7 @@ pack_unpack(VALUE str, VALUE fmt) p = RARRAY_PTR(a); pend = p + RARRAY_LEN(a); while (p < pend) { - if (TYPE(*p) == T_STRING && RSTRING_PTR(*p) == t) { + if (RB_TYPE_P(*p, T_STRING) && RSTRING_PTR(*p) == t) { tmp = *p; break; } |