Hi,
Is this API supported by ruby 1.9, I’m trying module to load pre-
compiled version of a script but I endup with core dump.
this the extension:
#include <ruby.h>
VALUE Loader = Qnil;
VALUE load_ruby_iseq(int argc, VALUE *argv, VALUE self)
{
VALUE data, opt=Qnil;
rb_scan_args(argc, argv, “11”, &data, &opt);
return rb_iseq_load(data, 0, opt);
}
void Init_loader()
{
Loader = rb_define_class(“Loader”, rb_cObject);
rb_define_singleton_method(Loader, “load”, load_ruby_iseq, -1);
}
This the first time i wrote ruby extension, so I’m guessing something
wrong with my code !!!
Thanks
Husam