Skip to content

Instantly share code, notes, and snippets.

@lsegal
Created September 13, 2010 06:20
Show Gist options
  • Save lsegal/576883 to your computer and use it in GitHub Desktop.
Save lsegal/576883 to your computer and use it in GitHub Desktop.
#include <ruby.h>
extern VALUE rb_cISeq;
extern VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);
static VALUE
iseq_s_load(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_myseq()
{
rb_define_singleton_method(rb_cISeq, "load", iseq_s_load, -1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment