summaryrefslogtreecommitdiff
path: root/encoding.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-02 14:50:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-02 14:50:54 +0000
commit048202f4467a1cf16040318b759d43fa961eb0a2 (patch)
treea3c1e42e94463656a10cfcf1b5898ca8cca575a7 /encoding.c
parent48bc63fa7aadb25f3c0fdaad9c116e9171a8cfad (diff)
downloadruby-048202f4467a1cf16040318b759d43fa961eb0a2.tar.gz
* encoding.c (enc_find): simplified with RB_TYPE_P.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'encoding.c')
-rw-r--r--encoding.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/encoding.c b/encoding.c
index 8e80e8ce66..5e153e83dd 100644
--- a/encoding.c
+++ b/encoding.c
@@ -1054,7 +1054,7 @@ static VALUE
enc_find(VALUE klass, VALUE enc)
{
int idx;
- if (!SPECIAL_CONST_P(enc) && BUILTIN_TYPE(enc) == T_DATA && is_data_encoding(enc))
+ if (!RB_TYPE_P(enc, T_DATA) && is_data_encoding(enc))
return enc;
idx = str_to_encindex(enc);
if (idx == UNSPECIFIED_ENCODING) return Qnil;