load vs. instance_eval

M

matt neuburg

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.
 
M

matt neuburg

matt neuburg said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,176
Messages
2,570,947
Members
47,498
Latest member
log5Sshell/alfa5

Latest Threads

Top