From: Tobias Grimm Date: 2004-08-23T22:51:00+09:00 Subject: Re: ruby_init causing segfault ts wrote: > The call to rb_gc() is not in a protect function. > > Thanks! I don't exactly understand why, but this works. I now have to check if this somehow solves my "in-application"-problem too, To close this thread for anyone interested, here's the working code with rb_gc() called from within a protect function.: #include VALUE gc_wrap(VALUE arg) { rb_gc(); return Qnil; } int main() { ruby_init(); int status; rb_protect(gc_wrap, 0, &status); if (status) { printf("error\n"); } ruby_finalize(); } Tobias