From: Bill Kelly Date: 2004-05-29T05:57:47+09:00 Subject: Re: Calling global method Hi, From: "Sean O'Dell" > On Thursday 27 May 2004 22:52, Bill Kelly wrote: > > > > Not super pretty, but I'm currently using: > > > > def somemodule::somemethod > > Kernel.instance_eval { test() } > > end > > That's pretty ugly. I figured it would come down to having to do something > icky like this. Bah. How 'bout: class Global def self.method_missing(meth_id, *args) Object.instance_eval { self.send(meth_id, *args) } end end Then we can do: def somemodule::somemethod Global.test # or Global::test end Regards, Bill