Hi,

In message "Re: [ruby-core:20129] Ruby class variable access from C"
    on Thu, 27 Nov 2008 04:49:32 +0900, Christopher Thompson <cthompson / nexopia.com> writes:

|Great, but now I need to access that same variable through a C
|extension.  I think I can get it by doing:
|VALUE myvar = rb_eval_string("Myclass::myvar");
|but surely there's a better way?  I'm thinking something like
|rb_cvar_get() but that requires that I pass in a VALUE and all I have is
|a string at this point, "Myclass".

Get the reference of "Myclass" first.  You can get it by:

  * rb_eval_string()
  * rb_const_get()
  * or lot of other ways fit for your program

							matz.