Comment on this RCR (edit wiki page) | RCRchive home

RCR 98: ruby_run() calls exit?

submitted by Warden on 2002-05-07 21:34:07


This is a legacy RCR. If this is your RCR, please resubmit it using the new format and process.


I'm working on embedding ruby in c and I discovered that the ruby_run command calls exit once it's done. Now when using ruby as a pure interpreter, that's fine. But when I need to continue to run a program once ruby is done executing, I can't have it call exit. Is there a way around ruby calling exit? Or can it be removed? This issue also exists there's an exception thrown by ruby. can we have ruby_run return an error code so that it's more easily embeddable?

Vote for this RCR

Strongly opposed [0]
Opposed [0]
Neutral [0]
In favor [0]
Strongly advocate [0]

Change the status of this RCR to:

accepted

rejected

withdrawn


Add comments here

This comes up on the mailing list quite frequently (root, 2002-05-07 23:45:11)

There are a number of suggested ways of solving the problem, such as using rb_eval_string_protect. Try for one answer.

thanks (Warden, 2002-05-08 12:46:37)

Thanks. Lesson one children.... read the email lists :)

Back to RCRchive.


RCR Submission page and RCRchive powered by Ruby, Apache, RuWiki (modified), and RubLog