Load vs. instance_eval


#1

Assuming f is an absolute path, is there any important difference
between load(f) and instance_eval(File.read(f))? I have been saying the
latter, but I’m thinking I could equally well say the former… Thx - m.


#2

matt neuburg removed_email_address@domain.invalid wrote:

Assuming f is an absolute path, is there any important difference
between load(f) and instance_eval(File.read(f))? I have been saying the
latter, but I’m thinking I could equally well say the former… Thx - m.

Never mind, I see now that load pollutes the global namespace. m.