From: Daniel Carrera Date: 2003-01-25T09:20:36+09:00 Subject: Re: Ruby Modules in C On Sat, Jan 25, 2003 at 09:10:15AM +0900, Tim Hunter wrote: > You want rb_define_module_function: > > void rb_define_module_function(VALUE classmod, char *name, VALUE(*func()), > int argc); > > See the Pickaxe, chapter 17, page 190. Yes, I tried that too, and it doesn't work either. C code: rb_define_module_function(mScience, "Science.seven", mScience_seven, 0); IRB: >> Science::SOLAR_MASS => 1.98892e+30 >> Science.seven NameError: undefined method `seven' for Science:Module from (irb):3 >> Perhaps I just don't know the syntax. Does anyone know if I'm using these functions wrong? -- Daniel Carrera Graduate Teaching Assistant. Math Dept. University of Maryland. (301) 405-5137