From: ts Date: 2003-04-13T22:12:39+09:00 Subject: Re: ruby_script() >>>>> "S" == Simon Strandgaard <0bz63fz3m1qt3001@sneakemail.com> writes: >> ./a.out -e 'puts "hello"; raise "out"' You call -e it display -e pigeon% cat a.c #include static VALUE tt() { rb_raise(rb_eStandardError, "error"); return Qnil; } int main(int argc, char *argv[]) { int res; ruby_init(); ruby_init_loadpath(); ruby_script("embed"); // seems not to have any effect ? rb_protect(tt, 0, &res); if (res) { VALUE err = rb_inspect(ruby_errinfo); rb_backtrace(); fprintf(stdout, "ERROR %s\n", StringValuePtr(err)); } return 0; } pigeon% pigeon% a.out from embed ERROR # pigeon% Guy Decoux