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
|
@ -236,7 +236,7 @@ RB_METHOD(_kernelCaller)
|
|||
|
||||
VALUE trace = rb_funcall2(rb_mKernel, rb_intern("_mkxp_kernel_caller_alias"), 0, 0);
|
||||
|
||||
if (rb_type(trace) != RUBY_T_ARRAY)
|
||||
if (!RB_TYPE_P(trace, RUBY_T_ARRAY))
|
||||
return trace;
|
||||
|
||||
long len = RARRAY_LEN(trace);
|
||||
|
@ -320,7 +320,7 @@ static void runRMXPScripts()
|
|||
|
||||
VALUE scriptArray = kernelLoadDataInt(scriptPack.c_str());
|
||||
|
||||
if (rb_type(scriptArray) != RUBY_T_ARRAY)
|
||||
if (!RB_TYPE_P(scriptArray, RUBY_T_ARRAY))
|
||||
{
|
||||
showMsg("Failed to read script data");
|
||||
return;
|
||||
|
@ -337,7 +337,7 @@ static void runRMXPScripts()
|
|||
{
|
||||
VALUE script = rb_ary_entry(scriptArray, i);
|
||||
|
||||
if (rb_type(script) != RUBY_T_ARRAY)
|
||||
if (!RB_TYPE_P(script, RUBY_T_ARRAY))
|
||||
continue;
|
||||
|
||||
VALUE scriptName = rb_ary_entry(script, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue