From: "Iñaki Baz Castillo" Date: 2009-04-04T00:18:02+09:00 Subject: Adding a method to String class as Ruby C extension 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. -- Iñaki Baz Castillo