[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

load vs. instance_eval

matt

3/20/2009 12:46:00 AM

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.

--
matt neuburg, phd = matt@tidbits.com, http://www.tidbits...
Leopard - http://www.takecontrolbooks.com/leopard-custom...
AppleScript - http://www.amazon.com/gp/product/...
Read TidBITS! It's free and smart. http://www.t...
2 Answers

Joe

3/18/2009 4:37:00 PM

0

On Mar 17, 10:32 pm, "William Longyard" <longy...@ix.netcom.com>
wrote:
> bu...bu...but..... all those who supported the Messiah because he was
> supposed to stop wars, suckle the hunger, and heal the sick and the lame.....

It's obviously a different story when you're actually the President
and the security of the nation is in your hands. It ain't a talking
point anymore....it's real life, and you have to take real-life
measures to protect your countrymen....

Kudos to the man. I like him more every day....

matt

3/20/2009 12:54:00 AM

0

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.

--
matt neuburg, phd = matt@tidbits.com, http://www.tidbits...
Leopard - http://www.takecontrolbooks.com/leopard-custom...
AppleScript - http://www.amazon.com/gp/product/...
Read TidBITS! It's free and smart. http://www.t...