Merge pull request #57 from cremno/mri-use-rb_type_p-instead-of-rb_type
MRI: use RB_TYPE_P() instead of rb_type()
This commit is contained in:
commit
2ba9f6589b
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