diff --git a/binding-mri/binding-mri.cpp b/binding-mri/binding-mri.cpp index 9dc9331..5767b43 100644 --- a/binding-mri/binding-mri.cpp +++ b/binding-mri/binding-mri.cpp @@ -68,6 +68,7 @@ void fileIntBindingInit(); RB_METHOD(mriPrint); RB_METHOD(mriP); RB_METHOD(mriDataDirectory); +RB_METHOD(mkxpPuts); static void mriBindingInit() { @@ -94,6 +95,7 @@ static void mriBindingInit() VALUE mod = rb_define_module("System"); _rb_define_module_function(mod, "data_directory", mriDataDirectory); + _rb_define_module_function(mod, "puts", mkxpPuts); rb_define_global_const("MKXP", Qtrue); } @@ -104,6 +106,18 @@ showMsg(const QByteArray &msg) shState->eThread().showMessageBox(msg.constData()); } +RB_METHOD(mkxpPuts) +{ + RB_UNUSED_PARAM; + + const char *str; + rb_get_args(argc, argv, "z", &str, RB_ARG_END); + + qDebug() << str; + + return Qnil; +} + static void printP(int argc, VALUE *argv, const char *convMethod, const char *sep) {