Change soft-fail to use the config, rather than env
[rbx.git] / spec / subtend / ext / subtend_define_method_vis.c
blob9162fa57355042c1702be0b1be6cddd7fa75b85b
1 #include <ruby.h>
3 static VALUE smv_test(VALUE self) {
4 return rb_str_new2("test");
7 VALUE smv_undef_method(VALUE self, VALUE klass, VALUE name) {
8 rb_undef_method(klass, STR2CSTR(name));
9 return Qnil;
12 void Init_subtend_define_method_vis() {
13 VALUE cls, mod;
14 cls = rb_define_class("SubtendMethodVis", rb_cObject);
15 mod = rb_define_module("SubtendMethodVisModule");
17 rb_define_method(cls, "smv_test_public", smv_test, 0);
18 rb_define_protected_method(cls, "smv_test_protected", smv_test, 0);
19 rb_define_private_method(cls, "smv_test_private", smv_test, 0);
21 rb_define_singleton_method(mod, "smv_test_singleton", smv_test, 0);
22 rb_define_module_function(mod, "smv_test_module_function", smv_test, 0);
24 rb_define_global_function("smv_test_global_function", smv_test, 0);
26 rb_define_method(cls, "rb_undef_method", smv_undef_method, 2);