first commit
CI / Build (clang, clang++, ubuntu-22.04, linux, 3.10, master, x86,x86_64) (push) Canceled after 0s
CI / Build (clang, clang++, windows-2022, windows, 3.10, master, x86,x86_64) (push) Canceled after 0s
CI / Release (push) Canceled after 0s

This commit is contained in:
2026-09-13 22:18:11 +01:00
commit 08c03ac533
6701 changed files with 1577314 additions and 0 deletions
@@ -0,0 +1,5 @@
MRuby::Gem::Specification.new('mruby-exit') do |spec|
spec.license = 'MIT'
spec.author = 'mruby developers'
spec.summary = 'Kernel#exit method'
end
@@ -0,0 +1,29 @@
#include <stdlib.h>
#include <mruby.h>
static mrb_value
f_exit(mrb_state *mrb, mrb_value self)
{
mrb_value status = mrb_true_value();
int istatus;
mrb_get_args(mrb, "|o", &status);
istatus = mrb_true_p(status) ? EXIT_SUCCESS :
mrb_false_p(status) ? EXIT_FAILURE :
(int)mrb_int(mrb, status);
exit(istatus);
/* not reached */
return status;
}
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)
{
}