MRI: use RB_TYPE_P() instead of rb_type()
Just a very small optimization.
This commit is contained in:
parent
6d414c0777
commit
70c40fe530
5 changed files with 14 additions and 15 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue