From: Joe Damato Date: 2008-10-01T09:32:19+09:00 Subject: [ruby-core:19059] Ruby class name from C extensions Hi - If I have ruby source that looks like this: class Test def .... end and in a ruby C extension I have something like: fprintf(stderr, "class name: %s\n", RSTRING(rb_class_path(obj->as.basic.klass))->ptr); I get output like this: class name: # Why doesn't it output something like: # ? There are two possibilities: either I am not using the correct obj struct or I am misusing/misunderstanding rb_class_path(). I am fairly certain I am using the correct struct, so I am probably misunderstanding how rb_class_path and related functions work -- is there a function I can call that if I pass in a klass or a VALUE it will return either a c string or an RSTRING that contains the class name? Any other hints or advice is greatly appreciated. Thanks, Joe