From: "Simon Kröger" Date: 2005-12-27T08:35:20+09:00 Subject: Re: global rb_funcall Eero Saynatkari wrote: > =?ISO-8859-1?Q?Simon_Kr=F6ger?= wrote: > >>Hi, >> >>i'm embedding ruby into a C++, how do i call _global_ functions from C? >> >>like >> >> rb_funcall2(??, rb_intern("test"), 0, NULL); >> >>thanks > > > All of the global methods become singleton methods of > the top-level Object object, so you should be able to > refer to rb_cObject (I am unable to test). If that > does not work, see if README.EXT provides any clues. > > >>Simon > > > > E > I was thinking of that possibility and dismissed the thought because "thats the class, not the object..". Well, from time to time my past trips me up. Thanks ! Simon