Debian Codegraph @

ext/-test-/notimplement/bug.c

raw
1 #include <ruby.h>
2
3 static VALUE
4 bug_funcall(int argc, VALUE *argv, VALUE self)
5 {
6 if (argc < 1) rb_raise(rb_eArgError, "not enough argument");
7 return rb_funcallv(self, rb_to_id(*argv), argc-1, argv+1);
8 }
9
10 void
11 Init_notimplement(void)
12 {
13 VALUE mBug = rb_define_module("Bug");
14 VALUE klass = rb_define_class_under(mBug, "NotImplement", rb_cObject);
15 rb_define_module_function(mBug, "funcall", bug_funcall, -1);
16 rb_define_module_function(mBug, "notimplement", rb_f_notimplement, -1);
17 rb_define_method(klass, "notimplement", rb_f_notimplement, -1);
18 }