Skip to content

Instantly share code, notes, and snippets.

@jonathanmarvens
Forked from beakr/repl.c
Created June 1, 2014 19:44
Show Gist options
  • Save jonathanmarvens/d0873f4083bf4a38dd66 to your computer and use it in GitHub Desktop.
Save jonathanmarvens/d0873f4083bf4a38dd66 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <mruby.h>
#include <mruby/compile.h>
int main(int argc, char ** argv)
{
mrb_state * mrb = mrb_open();
char code[250];
while (1) {
printf("[max:250]> ");
fgets(code, 250, stdin);
mrb_load_string(mrb, code);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment