From: matz@... (Yukihiro Matsumoto) Date: 2002-06-18T08:08:50+09:00 Subject: Re: How is rb_protect supposed to work? Hi, In message "How is rb_protect supposed to work?" on 02/06/18, "Jens Nissen" writes: |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. put "ruby_errinfo = Qnil;" here to clear. | script terminates | ("load") rb_load terminates and throws the exception again (!!! surprise |!!!) | because it was stored in the global variable ruby_errinfo rb_protect() is a primitive. rb_rescue() clears ruby_errinfo automagically. matz.