Skip to content

Instantly share code, notes, and snippets.

Created March 31, 2016 20:27
Show Gist options
  • Save anonymous/1c02584a32620b335d6199ccedb5a23f to your computer and use it in GitHub Desktop.
Save anonymous/1c02584a32620b335d6199ccedb5a23f to your computer and use it in GitHub Desktop.
#include <ruby.h>
int main(){
VALUE obj;
VALUE result;
VALUE map;
int error;
ruby_init();
rb_require("./e.rb");
obj=rb_str_new_cstr("");
map = rb_hash_new();
rb_hash_aset(map, rb_str_new2("e"),rb_str_new2("val"));
result = rb_funcall(obj, rb_intern("e"), 1, map);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment