>>>>> "T" == Tobin Baker <senderista / hotmail.com> writes:


T> new_mod = rb_define_module("Fruit");

T> and access it either from my code (i.e. rb_eval_string("Fruit")) or
T> from a client script that requires my extension, I get

T> uninitialized constant "Object::Fruit" (NameError)

 I've not understood can you give a small example ?


pigeon% cat tt.c
#include <ruby.h>

static VALUE
tt_tt(obj)
    VALUE obj;
{
    rb_warn("tt");
    return obj;
}

void Init_tt()
{
    VALUE tt_mTt = rb_define_module("Tt");
    rb_define_module_function(tt_mTt, "tt", tt_tt, 0);
}
pigeon% 

pigeon% ruby -rtt -e 'Tt::tt'
-e:1: warning: tt
pigeon% 


Guy Decoux