The Freaky Freaky Sandbox

Clone and gut Ruby itself!

Have you ever wanted to clear out all of Ruby's objects for a moment, just a moment, and then bring everything back all of the sudden? FreakyFreaky can help you with that!

 require 'sandbox'
 ffbox = Sandbox.new
 ffbox.eval %{
   class Test
   end

   test = Test.new
 }

 test = Test.new
   #=> NameError: uninitialized constant Test

But why is it FreakyFreaky? Well, see, that's just it. It swaps out Ruby's main symbol table. So, you know, it's pretty hard to predict all the myriad of ways this affects Ruby.

But, For Now…

For now, it appears to do its thing just fine. So let's keep playing with it.

The Sandbox Mailing List

To join:

Send a message to sandbox@….
Cc: why@….