Forum: Ruby load vs. instance_eval

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fbb4d027695dfdf76bf448b15d7e306a?d=identicon&s=25 matt neuburg (Guest)
on 2009-03-20 01:50
(Received via mailing list)
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.
Fbb4d027695dfdf76bf448b15d7e306a?d=identicon&s=25 matt neuburg (Guest)
on 2009-03-20 01:55
(Received via mailing list)
matt neuburg <matt@tidbits.com> 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.
This topic is locked and can not be replied to.