From 8b4000c969b345c35e6330aa835ea0e224d9752d Mon Sep 17 00:00:00 2001 From: Ryan Fitzgerald Date: Sun, 9 Mar 2014 19:41:57 -0700 Subject: [PATCH] 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. --- spec/sticky_locals_spec.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/spec/sticky_locals_spec.rb b/spec/sticky_locals_spec.rb index 6ba42b14..6380b339 100644 --- a/spec/sticky_locals_spec.rb +++ b/spec/sticky_locals_spec.rb @@ -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