Please don't do this. There are proper debuggers for Ruby that you can use to accomplish everything described here and more, and all without opening gaping security holes or beating the metaprogramming facilities in Ruby to a bloody pulp.
Also, I vote for Ruby's new motto to be: "Just because you can, doesn't mean you should."