diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-02 22:39:28 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-02 22:39:28 +0000 |
commit | 73407963382f4a7a899732fcd3f4d8b5d343211a (patch) | |
tree | aa08b57b6e6f9c174cff4947d0365cb203df9743 | |
parent | ae1bccf7a49225fdc8a58f9f83926e3d675dc0c2 (diff) | |
download | ruby-73407963382f4a7a899732fcd3f4d8b5d343211a.tar.gz |
Revert "* encoding.c (enc_find): simplified with RB_TYPE_P."
This reverts commit r32817.
It has less code on the surface, but it needs more condition.
Moreover it doesn't need !.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | encoding.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/encoding.c b/encoding.c index 5e153e83dd..8e80e8ce66 100644 --- a/encoding.c +++ b/encoding.c @@ -1054,7 +1054,7 @@ static VALUE enc_find(VALUE klass, VALUE enc) { int idx; - if (!RB_TYPE_P(enc, T_DATA) && is_data_encoding(enc)) + if (!SPECIAL_CONST_P(enc) && BUILTIN_TYPE(enc) == T_DATA && is_data_encoding(enc)) return enc; idx = str_to_encindex(enc); if (idx == UNSPECIFIED_ENCODING) return Qnil; |