Bob Calco <rcalco / cortechs.com> wrote:
: I'd like to embed Ruby in an agent/service program that keeps running, but
: I'm wondering if it isn't easier to just create a process and redirect the
: output rather than embed the interpreter. I've looked at main.c for an
: example, and at eruby, but neither are quite analogous to what I'd like to
: do.

I've found embedding Ruby to be a breeze compared to other scripting
languages.  Writing ns_ruby is very easy (when I have time for it), and it
is still simple enough to be a good learning example (if you can
understand the entry and exit points of flow control from nsd).

Can you describe the architecture of your program and the flow control
into and out of ruby?  If I, and others, can get that info we can provide
some very specific assistance.