----- Original Message -----
From: Chris Moline <ugly-daemon / home.com>
To: ruby-talk ML <ruby-talk / ruby-lang.org>
Sent: Saturday, May 26, 2001 8:10 PM
Subject: [ruby-talk:15786] Splitting up a huge ruby file


> Hi, this is probably really obvious but I was wondering if ruby has a way
to
> split up a source file into several smaller ones but still have them
behave as
> if they were all in one file. The reason I ask is because I have some gtk
stuff
> that is getting pretty long. I have tried load, and require, and include
but
> none of those quite behave as I want. load is closest to what i want but i
can't
> access variables defined in another file. Any ideas?? It can use classes
and/or
> modules I am just not sure how to go about doing it.

You could always do:

    eval(IO.read("myfile.rb"))

There may be a better way.

Hal