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 and pry fails to function as usual.
the commit changes that behavior so that the exception is wrapped in an instance of
Pry::LastException who is a subclass of BasicObject. Pry::LastException is a copy&paste
of what was defined dynamically in pry_instance.rb but it allows for frozen exceptions
to remain frozen and still provides the methods pry dynamically defined on an exception
object before. through a wrapper class pry also no longer modifies an exception object
that it doesn't own.
Fix issue #704 (newlines are stripped from inside pasted strings)
Also, make sure that other literals (system calls, regexps) also comply
this rule.
Reviewed-by: Conrad Irwin <conrad.irwin@gmail.com>
* removed most historicla junk from lib/pry/test/helper.rb
* relocated recalcitrant junk to the local spec/helper.rb (this isn't exposed to 3rd parties)