On Oct 29, 2011, at 9:57 PM, Dami=E1n M. Gonz=E1lez wrote:

> Hello guys, a short question (I didn't find the answer around inet):
> Do exist some way to "exclude" any file "required" in Ruby irb?
> I'll show you why I'm asking: suppose that you load by the "require"
> method a file which have a source code named anything.rb, so:
>=20
> require "anything"
>=20
> This program will run, you interact with it, and it will finish,
> because it did the thing that supposed to do and it finished. Now, I
> want to run it again, is tedious shut down the prompt and open it =
again.
> Is there any way in which I can "exclude" this file anything.rb and =
then
> "require" again...or something. Thanks for your time, I appreciate it.

"require" puts whatever it manages to load into an array globally =
accessible via variable $". You can either remove the entry from $" or =
simply use "load" instead of "require" -- only make sure you specify the =
extension, e.g.:

load "anything.rb"

Hope this helps,
Gennady.

>=20
> --=20
> Posted via http://www.ruby-forum.com/.
>=20