diff options
Diffstat (limited to 'test/init_mrbtest.c')
| -rw-r--r-- | test/init_mrbtest.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/init_mrbtest.c b/test/init_mrbtest.c new file mode 100644 index 000000000..5d977da34 --- /dev/null +++ b/test/init_mrbtest.c @@ -0,0 +1,16 @@ +#include "mruby.h" +#include "mruby/irep.h" +#include "mruby/dump.h" +#include "mruby/string.h" +#include "mruby/proc.h" + +extern const char mrbtest_irep[]; + +void +mrb_init_mrbtest(mrb_state *mrb) +{ + int n = mrb_read_irep(mrb, mrbtest_irep); + + mrb_run(mrb, mrb_proc_new(mrb, mrb->irep[n]), mrb_top_self(mrb)); +} + |
