Project

General

Profile

Bug #17788 » testgem.cc

memel (Maia Engeli), 04/08/2021 11:02 PM

 
#include <stdio.h>
#include <ruby.h>
#include <iostream>

VALUE says(VALUE _self, VALUE str) {
Check_Type(str, T_STRING);
puts(StringValueCStr(str));
return Qnil;
}

void Init_testgem() {
VALUE mod = rb_define_module("Simon");
const int num_args = 1;
std::cout << "*** testgem initialized ***" << std::endl;
rb_define_module_function(mod, "says", says, num_args);
}
(1-1/3)