MRI: use RB_TYPE_P() instead of rb_type()

Just a very small optimization.
This commit is contained in:
cremno 2014-08-25 10:22:23 +02:00
parent 6d414c0777
commit 70c40fe530
5 changed files with 14 additions and 15 deletions

View file

@ -159,7 +159,7 @@ RB_METHOD(kernelSaveData)
static VALUE stringForceUTF8(VALUE arg)
{
if (rb_type(arg) == RUBY_T_STRING && ENCODING_IS_ASCII8BIT(arg))
if (RB_TYPE_P(arg, RUBY_T_STRING) && ENCODING_IS_ASCII8BIT(arg))
rb_enc_associate_index(arg, rb_utf8_encindex());
return arg;