daz wrote:

> You don't mention the wiki entry, so:
> http://www.rubygarden.org/ruby?EmbedRuby

Thanks.  I did look at that, and it gives some answers and raises some
more questions.

Now the pressing issue is how I can capture all the output of the Ruby
script.  (Imagine a GUI-based command shell that needs to be able to
snag all the console IO of the Ruby script.)  There are some initial
thoughts about this in the embedding tutorial at
http://metaeditor.sourceforge.net/embed/ .

Would it be possible to inject an overload for IO#write or somesuch
from the C program into Ruby before the script runs?  If so, how could
I do that?  Otherwise, I might have to make a special build of Ruby to
do callbacks into the app, and that's not nice.

-- Timothy