From: Nicholas Van Weerdenburg Date: 2005-01-19T09:23:49+09:00 Subject: Re: require of a .file load works, but require would be nice. I'm now trying to understand exactly how load works. load(filename, wrap =false) Didn't do what I wanted, so I went with the following lines=File.read(filename) eval(lines) Which did work. Docs for Kernel#load mention: "In no circumstance will any local variables in the loaded file be propagated to the loading environment." Any ideas for how to use load and still set instance variables? Thanks, Nick On Tue, 18 Jan 2005 06:25:05 +0900, Patrick May wrote: > Hello, > > On Monday, January 17, 2005, at 12:46 AM, Nicholas Van Weerdenburg > wrote: > > > Hi all, > > > > I'm attempting to do a user config file as a ruby script to be > > required- e.g. ~/.myrc > > > > load ENV['HOME'] + "/.myrc" > > > > works, but "require" fails in its place saying it can't find .myrc. Is > > this a bug in require? > > I made an old rcr about this: > > http://www.rcrchive.net/rcr/show/149 > > We should resubmit it? > > ~ Patrick > >