From: Elias Athanasopoulos Date: 2003-12-13T19:08:52+09:00 Subject: Re: getting a method from a block in C Hello Guy! On Fri, Dec 12, 2003 at 07:51:30PM +0900, ts wrote: > >>>>> "e" == elathan writes: > > >> don't forget to define a mark function, and call rb_gc_mark(proc) > > e> You mean a mark function for the Ruby garbage collector? > > yes, the block must be marked otherwise the ruby GC will remove it. > > This mean that you must define a mark function for your C++ object and > call rb_gc_mark(proc) inside it. I think I have done what you suggested. However I get: foo.rb:42: [BUG] rb_gc_mark(): unknown data type 0x28(0x89963f8) non object ruby 1.8.0 (2003-08-04) [i586-linux] Which means that I haven't done it in the right way. I tried using gdb to identify the 'non-object' variable which can't be marked, with no luck. Is there another way to accomplish this? Also, the only way to associate a mark function with a new ruby class is via Data_Wrap_Struct/Data_Make_Struct. Is this correct? Regards, -- University of Athens I bet the human brain Physics Department is a kludge --Marvin Minsky