From: Brian Candler Date: 2009-08-11T20:27:29+09:00 Subject: Re: Load & Execute Code From a Database Paul F Fraser wrote: > I have tried to locate in the ruby source, what ruby does with a ruby > file after it loads it with require or load, but the src became a little > obtuse. > Does require use eval, or what ruby technique is used to incorporate > the required code into the system? load("file.rb") is pretty much the same as eval(File.read("file.rb")) The source is a bit hard to follow, but ultimately one calls rb_compile_file and the other calls rb_compile_string, and both call yycompile in parse.c (I'm looking at 1.8.6 source) -- Posted via http://www.ruby-forum.com/.