From: newbie Date: 2005-11-08T17:57:12+09:00 Subject: crash of extension on rb_str_new2 Hi, all I am integrating a 3rd party API with ruby extension. The code is roughly like this void my_function() { char p[256]; ...//assign the value of p in the api return rb_str_new2(p);//This cause a crash. } while if I change the last part a little bit as, VALUE str=rb_str_new2(p); return str; This seems not crashing It looks like more related to ruby GC? Can anyone explain on this? and how to prevent this kind of crash? Thanks!