From: Lyle Johnson Date: 2003-11-17T10:23:40+09:00 Subject: Re: debugging ruby extensions Elias Athanasopoulos wrote: > Is there a handy function to display messages to stdout/sterr inside > a ruby extension? How about fprintf()? ;) > BTW, is this a nice way to determine if an argument to a method > is an array of objects? I would probably use the Check_Type() macro: Check_Type(obj, T_ARRAY); which raises a TypeError exception if obj is not an Array. If you want more control over how the error is reported, instead do something like: if (TYPE(obj) != T_ARRAY) { /* report error here */ } Hope this helps, Lyle