Remove version guard from LastException check

In the happy path, the object is a RuntimeError and therefore inherits
from Object. In the sad path, failing when we try to bind the method is
just as informative as failing the actual assertion.
This commit is contained in:
Ryan Fitzgerald 2014-03-09 19:41:57 -07:00
parent 67806cff46
commit 8b4000c969
1 changed files with 2 additions and 7 deletions

View File

@ -29,13 +29,8 @@ describe "Sticky locals (_file_ and friends)" do
input '_ex_.message == "halp"'
output '=> true'
if Pry::Helpers::BaseHelpers.mri_20? || Pry::Helpers::BaseHelpers.mri_21?
input 'Kernel.instance_method(:class).bind(_ex_).call'
output '=> RuntimeError'
end
input '_ex_.wrapped_exception'
output /NoMethodError/
input 'Kernel.instance_method(:class).bind(_ex_).call'
output '=> RuntimeError'
end
end