On Jan 11, 2007, at 9:04 AM, Rob Biedenharn wrote:
>     rb_define_const(mMyConstants, "MY_CONSTANT",   INT2NUM 
> (MY_CONSTANT));
>     rb_define_const(mMyConstants, "YOUR_CONSTANT", INT2NUM 
> (YOUR_CONSTANT));
>     rb_define_const(mMyConstants, "HIS_CONSTANT",  INT2NUM 
> (HIS_CONSTANT));

Hah!  I wasn't too far off with my guess of:
>   rb_constant_set( klass, 'MY_CONSTANT', MY_CONSTANT)


Anyway, you are still stuck with having to keep the C .h file and the  
Ruby
.c extension in sync by hand.  I'd pick any other scheme that allowed  
you
to only worry about maintaining a single file with the constant  
definitions.

Gary Wright