diff --git a/spec/kahlan/matcher/ToThrowSpec.php b/spec/kahlan/matcher/ToThrowSpec.php
index <HASH>..<HASH> 100644
--- a/spec/kahlan/matcher/ToThrowSpec.php
+++ b/spec/kahlan/matcher/ToThrowSpec.php
@@ -44,6 +44,11 @@ describe("toThrow::match", function() {
 			throw new Exception('exception message');
 		};
 		expect($closure)->not->toThrow(new RuntimeException('exception message'));
+
+		$closure = function() {
+			throw new RuntimeException('exception message');
+		};
+		expect($closure)->not->toThrow(new Exception('exception message'));
 	});
 
 });
\ No newline at end of file
diff --git a/src/kahlan/matcher/ToThrow.php b/src/kahlan/matcher/ToThrow.php
index <HASH>..<HASH> 100644
--- a/src/kahlan/matcher/ToThrow.php
+++ b/src/kahlan/matcher/ToThrow.php
@@ -32,7 +32,7 @@ class ToThrow {
 			return $e->getMessage() === $expected;
 		}
 		$class = get_class($exception);
-		if ($e instanceof $class) {
+		if ($class === 'kahlan\matcher\AnyException' || get_class($e) === $class) {
 			$sameCode = $e->getCode() === $exception->getCode();
 			$sameMessage = $e->getMessage() === $exception->getMessage();
 			$sameMessage = $sameMessage || !$exception->getMessage();
Fixes an issue in the ToThrow matcher.