Skip to content

Commit

Permalink
Support respec 1.14.7+ (Fixes #49, #62)
Browse files Browse the repository at this point in the history
  • Loading branch information
ConradIrwin committed Apr 22, 2014
1 parent ee9be6e commit eed092a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pry-rescue/rspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ def self.run(example)
begin
before

example.binding.eval('@exception = nil')
example.binding.eval('@exception = nil; @example && @example.instance_variable_set(:@exception, nil)')
example.run
if e = example.binding.eval('@exception')
if e = example.binding.eval('@exception || @example && @example.instance_variable_get(:@exception)')
Pry::rescued(e)
end

Expand Down

0 comments on commit eed092a

Please sign in to comment.