From: Elias Athanasopoulos Date: 2004-05-29T19:44:34+09:00 Subject: Re: segfault with rb_eval_string() On Sat, May 29, 2004 at 03:21:57PM +0900, Yukihiro Matsumoto wrote: > Hi, > > In message "segfault with rb_eval_string()" > on 04/05/29, Elias Athanasopoulos writes: > > |I have a segfault when I use rb_eval_string() through a shared > |library. > > You are calling Ruby function without initialization. Thank you, I used ruby_init() before rb_eval_string() and it worked. However, when the string to be evaluated is not a valid Ruby command the interpreter segfaults, instead of just printing the error. For an rb_eval_string("puts '"): elathan@velka:~/TRuby/tmp> ./runit (eval): (eval): compile error (SyntaxError) (eval): unterminated string meets end of file(eval): [BUG] Segmentation fault ruby 1.9.0 (2004-05-25) [i686-linux] Aborted I would like to be able to handle the error. Regards, -- University of Athens I bet the human brain Physics Department is a kludge --Marvin Minsky