Sha256: 5c5dbb05e7dc71cccd4ec4b274536934386b2031b58f3f13293ec4622311cf64
Contents?: true
Size: 632 Bytes
Versions: 11
Compression:
Stored size: 632 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_ANY()); mrb_define_method(mrb, krn, "format", mrb_f_sprintf, MRB_ARGS_ANY()); } void mrb_mruby_sprintf_gem_final(mrb_state* mrb) { /* nothing to do. */ }
Version data entries
11 entries across 11 versions & 1 rubygems