From: Paul Brannan Date: 2003-04-03T04:23:41+09:00 Subject: Re: Checking for valid Ruby objects? On Thu, Apr 03, 2003 at 03:32:24AM +0900, Lyle Johnson wrote: > If I have a void pointer in C extension code, is there any way to tell > if it is a valid Ruby object (versus a pointer to some other data), > similar to what's done in the (private) is_pointer_to_heap() function? I think it should be possible to use id2ref; if it raises an exception, then you don't have a valid object. I'm curious: why do you need to do this anyway? Paul