Hi, I want to add a method to String class, and I want this method to
be defined in C.
In the C code, to add a method I must do:
rb_define_method(myClass, “hello”, hello, arg_count);
but I don’t know how to set myClass to point to String class.
To create a new class I should do:
VALUE myClass = rb_define_class_under(myModule, “MyClass”,
rb_cObject);
Since rb_cObject means Ruby Object class, could be rb_cString what I’m
looking for?
Thanks.