MRI-Binding: Don't refine Kernel#caller in RGSS3

This commit is contained in:
Jonas Kulla 2014-05-07 03:19:06 +02:00
parent 1bdcfa7b04
commit 72fc659a4c
1 changed files with 6 additions and 0 deletions

View File

@ -104,8 +104,10 @@ static void mriBindingInit()
_rb_define_module_function(mod, "data_directory", mriDataDirectory);
_rb_define_module_function(mod, "puts", mkxpPuts);
#ifndef RGSS3
rb_define_alias(rb_singleton_class(rb_mKernel), "_mkxp_kernel_caller_alias", "caller");
_rb_define_module_function(rb_mKernel, "caller", _kernelCaller);
#endif
rb_define_global_const("MKXP", Qtrue);
}
@ -181,6 +183,8 @@ RB_METHOD(mriDataDirectory)
return pathStr;
}
#ifndef RGSS3
RB_METHOD(_kernelCaller)
{
RB_UNUSED_PARAM;
@ -213,6 +217,8 @@ RB_METHOD(_kernelCaller)
return trace;
}
#endif
static VALUE newStringUTF8(const char *string, long length)
{
return rb_enc_str_new(string, length, rb_utf8_encoding());