Sha256: 65e0f4c9c8e2297b252f933ea65931ef8f87d2968d0af2a6da58cac9f60d5d83

Contents?: true

Size: 402 Bytes

Versions: 25

Compression:

Stored size: 402 Bytes

Contents

#include <stdlib.h>
#include <mruby.h>

static mrb_value
f_exit(mrb_state *mrb, mrb_value self)
{
  mrb_int i = EXIT_SUCCESS;

  mrb_get_args(mrb, "|i", &i);
  exit((int)i);
  /* not reached */
  return mrb_nil_value();
}

void
mrb_mruby_exit_gem_init(mrb_state* mrb)
{
  mrb_define_method(mrb, mrb->kernel_module, "exit", f_exit, MRB_ARGS_OPT(1));
}

void
mrb_mruby_exit_gem_final(mrb_state* mrb)
{
}

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
script_core-0.1.1 ext/enterprise_script_service/mruby/mrbgems/mruby-exit/src/mruby-exit.c
script_core-0.1.0 ext/enterprise_script_service/mruby/mrbgems/mruby-exit/src/mruby-exit.c
script_core-0.0.6 ext/enterprise_script_service/mruby/mrbgems/mruby-exit/src/mruby-exit.c
script_core-0.0.5 ext/enterprise_script_service/mruby/mrbgems/mruby-exit/src/mruby-exit.c
esruby-0.2.0 resources/mruby/mrbgems/mruby-exit/src/mruby-exit.c
esruby-0.1.5 resources/mruby/mrbgems/mruby-exit/src/mruby-exit.c
esruby-0.1.4 resources/mruby/mrbgems/mruby-exit/src/mruby-exit.c
esruby-0.1.3 resources/mruby/mrbgems/mruby-exit/src/mruby-exit.c
esruby-0.1.2 resources/mruby/mrbgems/mruby-exit/src/mruby-exit.c
esruby-0.1.1 resources/mruby/mrbgems/mruby-exit/src/mruby-exit.c
esruby-0.1.0 resources/mruby/mrbgems/mruby-exit/src/mruby-exit.c
esruby-0.0.11 resources/mruby/mrbgems/mruby-exit/src/mruby-exit.c
esruby-0.0.10 resources/mruby/mrbgems/mruby-exit/src/mruby-exit.c
esruby-0.0.9 resources/mruby/mrbgems/mruby-exit/src/mruby-exit.c
esruby-0.0.8 resources/mruby/mrbgems/mruby-exit/src/mruby-exit.c
esruby-0.0.7 resources/mruby/mrbgems/mruby-exit/src/mruby-exit.c
esruby-0.0.6 resources/mruby/mrbgems/mruby-exit/src/mruby-exit.c
esruby-0.0.5 resources/mruby/mrbgems/mruby-exit/src/mruby-exit.c
esruby-0.0.3 resources/mruby/mrbgems/mruby-exit/src/mruby-exit.c
esruby-0.0.2 resources/mruby/mrbgems/mruby-exit/src/mruby-exit.c