From: Timothy Hunter Date: 2005-11-13T22:02:21+09:00 Subject: Re: More fun with C Eric Hofreiter wrote: > I really wasn't trying to complain, I just wanted a little help, and I guess I got carried away since I was frustrated and confused. Reading it over again I realize that I sounded stupid. But you people seem to have a lot of free time to pick apart everything that I say. Sorry for wasting it. > > Back to the point: can anyone tell me how to use rb_require or rb_const_get? I get errors when I use them like so: rb_require("myfile"); rb_const_get(rb_cObject, rb_intern("MyClass")). Is there another way to load a file or get a user-defined class name? Thank you for any helpful responses. > Here's a snippet from RMagick. This is the C equivalent of require 'observer' class Pixel include Observable ... end rb_require("observer"); observable = rb_const_get(rb_cObject, rb_intern("Observable")); rb_include_module(Class_Pixel, observable);