how to know the type of a variable? [duplicate]
Im working with Ruby c extension, I have following sample code,
const char varP[] = "exceptionString";
VALUE reValue = rb_funcall(*Ptr, rb_intern("exception"), 1, rb_str_new2(varP));
rb_funcall() function returns the new object of a class and it is stored in "reValue" variable. How we can know the class name of value returned by rb_funcall()? Thanks in advance.
you can find this all just by googling...this function is defined in ruby.h
see this http://svn.joyent.com/opensource/dtrace/ruby/ruby-1.8.5/ruby.h
精彩评论