From: Steven Jenkins Date: 2006-08-05T05:20:54+09:00 Subject: Re: rdoc bug? Eric Hodel wrote: > On Aug 4, 2006, at 11:25 AM, Steven Jenkins wrote: > >> I think I've found a bug in rdoc's handling of C files. Specifically, >> it turns a method created by rb_create_module_function() into an >> instance method. > Can you give a concrete example of where this happens? ---------------- snip ----------------- #include "ruby.h" /* * call-seq: * my_method -> nil * * Do nothing. */ static VALUE my_method (void) { return Qnil; } /* * call-seq: * my_module_function -> nil * * Do nothing. */ static VALUE my_module_function (void) { return Qnil; } void Init_mymodule () { VALUE mMyModule; mMyModule = rb_define_module ("MyModule"); rb_define_method (mMyModule, "my_method", my_method, 0); rb_define_module_function (mMyModule, "my_module_function", my_module_function, 0); } ---------------- snip ----------------- The resulting HTML lists both "my_method" and "my_module_function" under Public Instance methods. Steve