Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ruby.h"
- VALUE MyTest = Qnil;
- VALUE method_test(VALUE self) {
- int x = 10;
- return INT2NUM(x);
- }
- void Init_MyTest() {
- MyTest = rb_define_module("MyTestModule");
- rb_define_method(MyTest, "my_test", method_test, 0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement