From: Jens Nissen Date: 2002-06-18T03:36:50+09:00 Subject: How is rb_protect supposed to work? I have embedded Ruby into my application and got the following problem: I have a Script which calls "load" the loaded Script calls my C-Extension-Function foo, which calls with rb_protect a Ruby function. This Ruby-function throws an exception and C-function returns nicely because rb_protect handles it. script terminates ("load") rb_load terminates and throws the exception again (!!! surprise !!!) because it was stored in the global variable ruby_errinfo Quote from rb_load(fname, wrap) in eval.c: if (!NIL_P(ruby_errinfo)) /* exception during load */ rb_exc_raise(ruby_errinfo); (a) Is this intentional? (a1) If so, what else can I call instead of rb_protect, which clears the error!? (b) Did I do something wrong with my embedding of Ruby, some PUSH_TAG or whatever, so that this problem is only in "my" extended Ruby? Kind regards to all, Jens