From: "Iñaki Baz Castillo" Date: 2010-01-20T06:24:55+09:00 Subject: Re: Passing C Struct to Ruby El Martes, 19 de Enero de 2010, Mido Peace escribió: > in C ... > > int VALUE my_str_new(VALUE arg) > { > my_struct *str =init_Struct(arg) ; > return *str ; > } This is wrong. Any Ruby C function must return a VALUE object. This is, a Ruby method cannot return a C integer or a C struct. So you need to translate the above C struct into a Ruby hash, Ruby struct or a custom Ruby class instance. But definitively I recommend you to look for Ruby C extensions tutorials. -- Iñaki Baz Castillo