Skip to content

Instantly share code, notes, and snippets.

@kbarber
Created August 11, 2011 13:13
Show Gist options
  • Save kbarber/1139611 to your computer and use it in GitHub Desktop.
Save kbarber/1139611 to your computer and use it in GitHub Desktop.
Running ruby in C 2
#include <ruby.h>
int main(int argc, char *argv[]) {
ruby_init();
ruby_init_loadpath();
rb_load_file(argv[1]);
ruby_exec();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment