Skip to content

Instantly share code, notes, and snippets.

@mattn
Last active August 29, 2015 13:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattn/8840735 to your computer and use it in GitHub Desktop.
Save mattn/8840735 to your computer and use it in GitHub Desktop.
#include <mruby.h>
#include <mruby/variable.h>
#include <mruby/string.h>
#include <stdio.h>
int
main(int argc, char* argv[]) {
mrb_state* mrb = mrb_open();
mrb_value ver = mrb_const_get(mrb, mrb_obj_value(mrb->kernel_module), mrb_intern_lit(mrb, "MRUBY_VERSION"));
puts(RSTRING_PTR(ver));
mrb_close(mrb);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment