On Apr 4, 2005 10:29 AM, Charles Mills <cmills / freeshell.org> wrote:
> 
> Tom Copeland wrote:
> > On Tue, 2005-04-05 at 00:24 +0900, Robert Klemme wrote:
> > > > You can attach the function to Object:
> > >
> > > IMHO the appropriate place would be a private singleton method of
> Kernel
> > > wouldn't it?  At least all other "functions" (gsub, gsub! etc.) are
> placed
> > > there...
> >
> > Right you are, that's much better...
> >
> > Yours,
> >
> > Tom
> 
> you can also put them in a module quite easily:
> 
> void
> Init_myext(void)
> {
>   VALUE m = rb_define_module("M");
>   rb_define_singleton_method(m, "test", some_func, -1);
> }
> 
> now you have M.test()
> 
> -Charlie

Yeah, that's probably what I'm going to do.