Ron Jeffries <ronjeffries / acm.org> writes: > On Sun, 18 Mar 2001 05:22:07 +0900, Dave Thomas > <Dave / PragmaticProgrammer.com> wrote: > > >Ron Jeffries <ronjeffries / acm.org> writes: > > >(or command /c type ... depending on what you're running) You can try > >this from the command line to check. > > OK, I did > > content = IO.readlines(filenamestring) > #where filenamestring is the name of the rb file, > # e.g. button.rb > eval content.join > > That goes into an infinite loop. I printed content and it is in fact > the button.rb file, as one would expect. Ron, If you just want to execute the contents of a file as Ruby code, you can just do load "file.rb" If won't export the local variables out of the file, but then again neither will 'eval'. Dave