From: Tridib Bandopadhyay Date: 2012-04-06T01:09:07+09:00 Subject: Re: Terminated Object Error. Help Needed "Ondřej Bílka" wrote in post #1055109: > On Thu, Apr 05, 2012 at 06:17:29AM +0900, Tridib Bandopadhyay wrote: >> How to use with self? >> >> I have to access the string which is at array[arr_pos]. > Guess that GC ate it. Do you rb_gc_mark and array? I do have mark function. The array is a global declaration. When I try to run this code myA=talloc.use(31) // Fetch the string from index 31 and store in myA VALUE use(VALUE self,VALUE pos) { int arr_pos = NUM2INT(pos); printf("Index Contains:%s\n",array[arr_pos]); // array is a char ** return NUM2CHR(array[arr_pos]); } Everything is working fine the printf statement is giving me back the string which i allocated '3d' but don't know whats messing it up at the return statement. -- Posted via http://www.ruby-forum.com/.