----- Original Message ----- 
From: "Phil Tomson" <ptkwt / shell1.aracnet.com>

It seems like to call the constructor of a Ruby class from C that you
have to use rb_eval_string("YourRubyClass.new");  I don't see how you
could do it otherwise since rb_funcall needs a receiver and you don't yet
have a reciever:

  rb_funcall(VALUE recv, ID id, int argc, ...);

So how would you call Foo.new using rb_funcall?  You'd have to get the ID:
  rb_intern("Foo.new");
But then what would you use for recv?
----------------------------

I think the id is basically the symbol; so you only want the id for "new",
not for "Foo.new".  To get the recv, I think you can use the C version of:

  Object.const_get "YourClassName"

which is probably something like rb_const_get... make sure you intern your
strings!


Chris