From b0dd250dc95ea0fae89c3201967039d582fbf156 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 23 May 2012 07:13:21 +0000 Subject: 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 --- ext/zlib/zlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/zlib/zlib.c') diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index fee74bfc98..40864969f1 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -3369,7 +3369,7 @@ rb_gzwriter_write(VALUE obj, VALUE str) { struct gzfile *gz = get_gzfile(obj); - if (TYPE(str) != T_STRING) + if (!RB_TYPE_P(str, T_STRING)) str = rb_obj_as_string(str); if (gz->enc2 && gz->enc2 != rb_ascii8bit_encoding()) { str = rb_str_conv_enc(str, rb_enc_get(str), gz->enc2); -- cgit v1.2.3