mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
48bc63fa7a
commit
048202f446
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue