From: Bertram Scharpf Date: 2008-09-03T20:17:43+09:00 Subject: Re: rb_require() causes segfault Hi, Am Mittwoch, 03. Sep 2008, 12:05:40 +0900 schrieb Nobuyoshi Nakada: > At Wed, 3 Sep 2008 05:05:52 +0900, > Bertram Scharpf wrote in [ruby-talk:313696]: > > I just debugged into the JUMP_TAG() macro. Indeed the `prot_tag' > > pointer is NULL. Is this a bug to be reported? > > No thank you. Sorry. I was just irritated about getting absolutely no answer on such a simple question. > > > void sure_require( char *name) > > { > > rb_rescue( &call_require, (VALUE) name, &rescue_require, Qnil); > > use rb_protect() instead of rb_rescue(), the latter catches > only StandardError and its subclasses. I didn't realize that LoadError is not a subclass of StandardError. Now it is obvious to me. rb_rescue2( &call_require, (VALUE) name, &rescue_require, Qnil, rb_eLoadError, (VALUE) 0); T-h-a-n-k y-o-u! Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de