From: Robert Feldt Date: 2003-02-19T23:44:36+09:00 Subject: Re: Sourcing files On Wed, 19 Feb 2003, Bj�rn Lindstr�m wrote: > Jos Backus [20030219 07:32]: > > load "file" > > > > ? > > OK, say that config.rb is a file containing the line: > x = 23 > > and in my script I do: > > load './config.rb' > puts x > > this is what I get: > > ./script.rb:3: undefined local variable or method `x' for # (NameError) > Well, what about: File.open("./config.rb") {|f| eval f.read} puts x ? /Robert Feldt