# File lib/rspec/matchers/matcher.rb, line 28 def matches?(actual) @actual = actual if @expected_exception begin instance_exec(actual, &@match_block) true rescue @expected_exception => @rescued_exception false end else begin instance_exec(actual, &@match_block) rescue RSpec::Expectations::ExpectationNotMetError false end end end