Matj P. wrote in post #1043039:
> Embedding Ruby in C is poor documented part of Ruby programming. When I> call Ruby from C code and I do something wrong on Ruby side I get error> in this form:
>
> <dummy toplevel>:17: [BUG] Segmentation fault
> ruby 1.9.0 (2008-10-04 revision 19669) [i486-linux]

First and foremost, update your Ruby. 1.9.0 is old, and buggy. If you still get segfaults, you can recompile your Ruby with debug information enabled for easier debugging.

Someone more knowledgeable of the matter will hopefully chime in about the embedding itself. I've recently let myself be told that 1.9.3 should embed mostly OK, and can be run in its own thread, but I can't vouch for that.


--
rue