Sha256: e82c6ea2c9e10dc13bd2d3b2e07808ec7f06d3635aff435100f36f7cfd17640b
Contents?: true
Size: 666 Bytes
Versions: 8
Compression:
Stored size: 666 Bytes
Contents
/* ** kernel.c - Kernel module suppliment ** ** See Copyright Notice in mruby.h */ #include <mruby.h> mrb_value mrb_f_sprintf(mrb_state *mrb, mrb_value obj); /* in sprintf.c */ void mrb_mruby_sprintf_gem_init(mrb_state* mrb) { struct RClass *krn; if (mrb->kernel_module == NULL) { mrb->kernel_module = mrb_define_module(mrb, "Kernel"); /* Might be PARANOID. */ } krn = mrb->kernel_module; mrb_define_method(mrb, krn, "sprintf", mrb_f_sprintf, MRB_ARGS_REQ(1)|MRB_ARGS_REST()); mrb_define_method(mrb, krn, "format", mrb_f_sprintf, MRB_ARGS_REQ(1)|MRB_ARGS_REST()); } void mrb_mruby_sprintf_gem_final(mrb_state* mrb) { /* nothing to do. */ }
Version data entries
8 entries across 8 versions & 1 rubygems