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

Version Path
webruby-0.9.3 modules/mruby/mrbgems/mruby-sprintf/src/kernel.c
webruby-0.9.2 modules/mruby/mrbgems/mruby-sprintf/src/kernel.c
webruby-0.9.1 modules/mruby/mrbgems/mruby-sprintf/src/kernel.c
webruby-0.2.7 modules/mruby/mrbgems/mruby-sprintf/src/kernel.c
webruby-0.2.5 modules/mruby/mrbgems/mruby-sprintf/src/kernel.c
webruby-0.2.4 modules/mruby/mrbgems/mruby-sprintf/src/kernel.c
webruby-0.2.2 modules/mruby/mrbgems/mruby-sprintf/src/kernel.c
webruby-0.2.1 modules/mruby/mrbgems/mruby-sprintf/src/kernel.c
webruby-0.1.2 modules/mruby/mrbgems/mruby-sprintf/src/kernel.c
webruby-0.1.1 modules/mruby/mrbgems/mruby-sprintf/src/kernel.c
webruby-0.1.0 modules/mruby/mrbgems/mruby-sprintf/src/kernel.c