Change soft-fail to use the config, rather than env
[rbx.git] / spec / subtend / ext / subtend_module.c
blob2098d809a1e4300891249a5d56d0da1f2c6e16ed
1 #include <ruby.h>
3 VALUE sm_define_const(VALUE self, VALUE klass, VALUE val) {
4 rb_define_const(klass, "FOO", val);
5 return Qnil;
8 VALUE sm_const_defined(VALUE self, VALUE klass, VALUE id) {
9 return (VALUE)rb_const_defined(klass, SYM2ID(id));
12 void Init_subtend_module() {
13 VALUE cls;
14 cls = rb_define_class("SubtendModule", rb_cObject);
15 rb_define_method(cls, "rb_define_const", sm_define_const, 2);
16 rb_define_method(cls, "rb_const_defined", sm_const_defined, 2);