From: ts Date: 2001-05-22T20:15:12+09:00 Subject: [ruby-talk:15538] Re: Embedding Ruby - Segfaults? >>>>> "S" == Sean Middleditch writes: S> but I could swear that funcall will return Qnil (from my source-reading). Try it :-) pigeon% cat tt.c #include #include static VALUE tt() { rb_raise(rb_eSecurityError, "Insecure call"); return Qnil; } int main() { VALUE c; int state; ruby_init(); state = 0; c = rb_protect(tt, 0, &state); if (state) { c = rb_gv_get("$!"); c = rb_funcall(c, rb_intern("to_s"), 0); fprintf(stderr, "ERROR :%.*s\n", RSTRING(c)->len, RSTRING(c)->ptr); } } pigeon% pigeon% tt ERROR :Insecure call pigeon% Guy Decoux