pry/pry — pull request #1145 by robgleeson (2014-03-10 00:32:35+00:00)
Title: make a copy of exception caught by pry and leave original intact.

pry adds behavior(methods) to the exception it returns at _pry_.last_exception
in a repl but when the exception has been passed along as a frozen object ruby
will raise an exception when tries to do that.

this commit changes that behavior so that we clone the exception(which includes the
singleton methods of an object in the copy) and then extend that exception with a
new module called Pry::LastException. Pry::LastException is a copy&paste of what
we defined dynamically in pry_instance.rb