On Wed, 14 Jul 2004, Jesse van den Kieboom wrote:

> So how to call a function from the loaded file...

can't you do something evil like this?

~ > cat a.rb
def user_method
   p 42
end

~ > cat b.rb
class Wrapped
   class << self
     module_eval(IO.read('a.rb'))
   end
end
Wrapped.user_method

~ > ruby b.rb
42


b.rb is obviously the C bit.


-a
--
===============================================================================
| EMAIL   :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE   :: 303.497.6469
| A flower falls, even though we love it;
| and a weed grows, even though we do not love it. 
|   --Dogen
===============================================================================