diff options
Diffstat (limited to 'ext/-test-')
-rw-r--r-- | ext/-test-/iseq_load/extconf.rb | 1 | ||||
-rw-r--r-- | ext/-test-/iseq_load/iseq_load.c | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/ext/-test-/iseq_load/extconf.rb b/ext/-test-/iseq_load/extconf.rb new file mode 100644 index 0000000000..860f30befd --- /dev/null +++ b/ext/-test-/iseq_load/extconf.rb @@ -0,0 +1 @@ +create_makefile("-test-/iseq_load/iseq_load") diff --git a/ext/-test-/iseq_load/iseq_load.c b/ext/-test-/iseq_load/iseq_load.c new file mode 100644 index 0000000000..ffdde347e1 --- /dev/null +++ b/ext/-test-/iseq_load/iseq_load.c @@ -0,0 +1,21 @@ +#include <ruby.h> + +VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt); + +static VALUE +iseq_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_iseq_load(void) +{ + VALUE rb_cISeq = rb_eval_string("RubyVM::InstructionSequence"); + + rb_define_singleton_method(rb_cISeq, "iseq_load", iseq_load, -1); +} |