>>>>> "D" == Daniel Berger <djberg96 / hotmail.com> writes:

D> class File
D> TStruct = Struct.new("TStruct",:bar,:baz)
D> end

D> t = File::TStruct.new("hello","world")

 Probably I've not understood

uln% cat a.c
#include <ruby.h>

void Init_a()
{
    rb_const_set(rb_cFile, rb_intern("TStruct"),
                 rb_struct_define("TStruct","bar","baz",0));
}
 
uln% 

uln% ruby -ra -e 'p File::TStruct.new("hello","world")'
#<struct Struct::TStruct bar="hello", baz="world">
uln% 



Guy Decoux