Skip to content

Commit

Permalink
* encoding.c (enc_find): simplified with RB_TYPE_P.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Aug 2, 2011
1 parent 48bc63f commit 048202f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 048202f

Please sign in to comment.